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

Skip to content
Snippets Groups Projects
Commit d9e54f04 authored by Johannes Kainz's avatar Johannes Kainz
Browse files

added a test case for the new method in search service

parent 6fee1bb6
2 merge requests!188Merging Peer Reviewing et. al to Master,!164211 peer reviewing functionality
......@@ -43,6 +43,7 @@ import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.boot.test.mock.mockito.MockBean;
import org.springframework.security.test.context.support.WithAnonymousUser;
import org.springframework.security.test.context.support.WithMockUser;
import at.ac.uibk.gitsearch.GitsearchApp;
......@@ -307,4 +308,16 @@ public class SearchServiceIT {
Assertions.assertFalse(result.get().getSupportedActions().stream().anyMatch(action -> action.getPlugin().equals("Artemis Sharing Connector")));
}
@Test
@WithAnonymousUser
public void testSearchAll() throws IOException {
SearchResultsDTO searchResults = searchService.searchAll();
Assert.assertTrue("At least one hit?", searchResults.getSearchResult().size() >= 1);
Assert.assertEquals("We start at 0", 0, searchResults.getPageStartIndex());
LOGGER.info("found {} hits for search all", searchResults.getHitCount());
}
}
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