use of org.activityinfo.shared.command.handler.search.Searcher in project activityinfo by bedatadriven.
the class SearchTest method testSearchAll.
@Test
@Ignore
public void testSearchAll() throws CommandException {
Logger.getLogger("com.bedatadriven.rebar").setLevel(Level.ALL);
SearchResult result = execute(new Search("kivu"));
assertTrue("Expected all searchers to succeed", result.getFailedSearchers().isEmpty());
for (Searcher searcher : AllSearcher.supportedSearchers()) {
assertHasDimension(searcher.getDimensionType(), result);
}
assertHasRestrictionWithIds(DimensionType.AdminLevel, result, 2, 3);
assertHasRestrictionWithIds(DimensionType.Partner, result, 3);
assertHasRestrictionWithIds(DimensionType.Project, result, 4);
assertHasRestrictionWithIds(DimensionType.AttributeGroup, result, 3);
assertHasRestrictionWithIds(DimensionType.Indicator, result, 675);
assertHasRestrictionWithIds(DimensionType.Location, result, 1);
}
Aggregations