This is the codeAbility Sharing Platform! Learn more about the codeAbility Sharing Platform.

Skip to content
Snippets Groups Projects
Commit aad50efe authored by Eduard Frankford's avatar Eduard Frankford
Browse files

added IT for searchservice

parent 93cf2975
Branches
Tags
2 merge requests!62created achievementService and separated some functionality out of...,!45Achievements
...@@ -142,6 +142,17 @@ public class SearchServiceIT { ...@@ -142,6 +142,17 @@ public class SearchServiceIT {
} }
@Test
public void testEmailSearch() throws IOException {
searchClient.getLowLevelClient().getNodes().forEach(n -> {LOGGER.info("Using node {}", n);});
SearchResultsDTO searchResultPage = searchService.searchResultForAuthorEmail("stefan.podlipnig@tuwien.ac.at", SearchInputDTO.PAGE_SIZE);
org.junit.Assert.assertNotNull(searchResultPage.getSearchResult());
org.junit.Assert.assertTrue("At least one test hit", searchResultPage.getHitCount() >= 1);
assertThat(searchResultPage.getSearchResult(), everyItem(hasProperty("metadata",
hasProperty("creator", hasItemInArray(hasProperty("email", containsString("stefan.podlipnig@tuwien.ac.at")))))));
}
@Test @Test
public void testKeywordSearch() throws IOException { public void testKeywordSearch() throws IOException {
final SearchInputMetadataDTO searchMetadata = new SearchInputMetadataDTO(null, "latex", null, null, null); final SearchInputMetadataDTO searchMetadata = new SearchInputMetadataDTO(null, "latex", null, null, null);
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment