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

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

added IT for searchservice

parent 224c3c11
2 merge requests!188Merging Peer Reviewing et. al to Master,!164211 peer reviewing functionality
...@@ -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