Search in sources :

Example 1 with SearchResultMatcher

use of net.osmand.search.SearchUICore.SearchResultMatcher in project Osmand by osmandapp.

the class LocationSearchTest method search.

private void search(String string, LatLon latLon) throws IOException {
    SearchResultMatcher srm = new SearchUICore.SearchResultMatcher(null, null, 0, null, 100);
    new SearchCoreFactory.SearchLocationAndUrlAPI().search(new SearchPhrase(null, OsmAndCollator.primaryCollator()).generateNewPhrase(string, null), srm);
    Assert.assertEquals(1, srm.getRequestResults().size());
    Assert.assertEquals(latLon, srm.getRequestResults().get(0).location);
}
Also used : SearchResultMatcher(net.osmand.search.SearchUICore.SearchResultMatcher) SearchCoreFactory(net.osmand.search.core.SearchCoreFactory) SearchPhrase(net.osmand.search.core.SearchPhrase)

Aggregations

SearchResultMatcher (net.osmand.search.SearchUICore.SearchResultMatcher)1 SearchCoreFactory (net.osmand.search.core.SearchCoreFactory)1 SearchPhrase (net.osmand.search.core.SearchPhrase)1