|
|
@ -9,7 +9,7 @@ import org.junit.Before; |
|
|
|
import org.junit.Test; |
|
|
|
import org.junit.Test; |
|
|
|
|
|
|
|
|
|
|
|
public class SearchManegerTest { |
|
|
|
public class SearchManegerTest { |
|
|
|
SimilarSearchManeger similarSearchManeger; |
|
|
|
SimilarSearchManager similarSearchManager; |
|
|
|
ComplementAdviceManager complementAdviceManager; |
|
|
|
ComplementAdviceManager complementAdviceManager; |
|
|
|
DocumentSearchManager documentSearchManager; |
|
|
|
DocumentSearchManager documentSearchManager; |
|
|
|
PluginSearchManager pluginSearchManager; |
|
|
|
PluginSearchManager pluginSearchManager; |
|
|
@ -23,7 +23,7 @@ public class SearchManegerTest { |
|
|
|
public void setUp() { |
|
|
|
public void setUp() { |
|
|
|
recentSearchManager = RecentSearchManager.getInstance(); |
|
|
|
recentSearchManager = RecentSearchManager.getInstance(); |
|
|
|
recommendSearchManager = RecommendSearchManager.getInstance(); |
|
|
|
recommendSearchManager = RecommendSearchManager.getInstance(); |
|
|
|
similarSearchManeger = SimilarSearchManeger.getInstance(); |
|
|
|
similarSearchManager = SimilarSearchManager.getInstance(); |
|
|
|
complementAdviceManager = ComplementAdviceManager.getInstance(); |
|
|
|
complementAdviceManager = ComplementAdviceManager.getInstance(); |
|
|
|
documentSearchManager = DocumentSearchManager.getInstance(); |
|
|
|
documentSearchManager = DocumentSearchManager.getInstance(); |
|
|
|
pluginSearchManager = PluginSearchManager.getInstance(); |
|
|
|
pluginSearchManager = PluginSearchManager.getInstance(); |
|
|
@ -43,7 +43,7 @@ public class SearchManegerTest { |
|
|
|
lessModelList = recentSearchManager.getLessSearchResult(new String[]{"数据集"}); |
|
|
|
lessModelList = recentSearchManager.getLessSearchResult(new String[]{"数据集"}); |
|
|
|
Assert.assertNotNull(lessModelList); |
|
|
|
Assert.assertNotNull(lessModelList); |
|
|
|
|
|
|
|
|
|
|
|
lessModelList = similarSearchManeger.getLessSearchResult(new String[]{"数据集"}); |
|
|
|
lessModelList = similarSearchManager.getLessSearchResult(new String[]{"数据集"}); |
|
|
|
Assert.assertEquals(lessModelList.get(1).getType(), CellType.ROBOT); |
|
|
|
Assert.assertEquals(lessModelList.get(1).getType(), CellType.ROBOT); |
|
|
|
|
|
|
|
|
|
|
|
lessModelList = complementAdviceManager.getAllSearchResult(new String[]{"数据集"}); |
|
|
|
lessModelList = complementAdviceManager.getAllSearchResult(new String[]{"数据集"}); |
|
|
@ -51,7 +51,7 @@ public class SearchManegerTest { |
|
|
|
|
|
|
|
|
|
|
|
//返回MoreSearchResult
|
|
|
|
//返回MoreSearchResult
|
|
|
|
SearchResult moreModelList; |
|
|
|
SearchResult moreModelList; |
|
|
|
moreModelList = similarSearchManeger.getMoreSearchResult("数据集"); |
|
|
|
moreModelList = similarSearchManager.getMoreSearchResult("数据集"); |
|
|
|
Assert.assertNotNull(moreModelList); |
|
|
|
Assert.assertNotNull(moreModelList); |
|
|
|
|
|
|
|
|
|
|
|
moreModelList = recommendSearchManager.getMoreSearchResult("数据集"); |
|
|
|
moreModelList = recommendSearchManager.getMoreSearchResult("数据集"); |
|
|
@ -60,7 +60,7 @@ public class SearchManegerTest { |
|
|
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
@Test |
|
|
|
public void getModelFromCloudTest() { |
|
|
|
public void getModelFromCloudTest() { |
|
|
|
Assert.assertNotNull(SimilarSearchManeger.getModelFromCloud(new JSONObject())); |
|
|
|
Assert.assertNotNull(SimilarSearchManager.getModelFromCloud(new JSONObject())); |
|
|
|
Assert.assertNotNull(DocumentSearchManager.getModelFromCloud(new JSONObject())); |
|
|
|
Assert.assertNotNull(DocumentSearchManager.getModelFromCloud(new JSONObject())); |
|
|
|
Assert.assertNotNull(PluginSearchManager.getModelFromCloud(new JSONObject())); |
|
|
|
Assert.assertNotNull(PluginSearchManager.getModelFromCloud(new JSONObject())); |
|
|
|
} |
|
|
|
} |
|
|
|