diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2016-06-29 10:37:58 +1200 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2016-06-29 10:37:58 +1200 |
commit | 615a80021e52e27adcffaa1d3fa2fd15f4e589b7 (patch) | |
tree | dd4564f3f4b970bd1caf86eccce5db3ce2f4574a /test | |
parent | d71fe8f7c6a8e8dd86992842060ab6dbac8b12f4 (diff) | |
download | trackermap-server-615a80021e52e27adcffaa1d3fa2fd15f4e589b7.tar.gz trackermap-server-615a80021e52e27adcffaa1d3fa2fd15f4e589b7.tar.bz2 trackermap-server-615a80021e52e27adcffaa1d3fa2fd15f4e589b7.zip |
Support Geocode Farm reverse geocoder
Diffstat (limited to 'test')
-rw-r--r-- | test/org/traccar/geocode/ReverseGeocoderTest.java | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/test/org/traccar/geocode/ReverseGeocoderTest.java b/test/org/traccar/geocode/ReverseGeocoderTest.java index ada0afbbe..2b0c30779 100644 --- a/test/org/traccar/geocode/ReverseGeocoderTest.java +++ b/test/org/traccar/geocode/ReverseGeocoderTest.java @@ -10,7 +10,7 @@ public class ReverseGeocoderTest { @Test public void test() throws InterruptedException { if (enable) { - testGoogle(); + testGeocodeFarm(); } } @@ -79,4 +79,16 @@ public class ReverseGeocoderTest { Assert.assertEquals("Charleston Road, California, US", waitAddress()); } + public void testGeocodeFarm() throws InterruptedException { + ReverseGeocoder reverseGeocoder = new GeocodeFarmReverseGeocoder(0); + + reverseGeocoder.getAddress(new AddressFormat(), 34.116302, -118.051519, new ReverseGeocoder.ReverseGeocoderCallback() { + @Override + public void onResult(String address) { + setAddress(address); + } + }); + Assert.assertEquals("Estrella Avenue, Arcadia, California, United States", waitAddress()); + } + } |