diff options
Diffstat (limited to 'test/org/traccar/geocoder')
-rw-r--r-- | test/org/traccar/geocoder/AddressFormatTest.java | 5 | ||||
-rw-r--r-- | test/org/traccar/geocoder/GeocoderTest.java | 23 |
2 files changed, 15 insertions, 13 deletions
diff --git a/test/org/traccar/geocoder/AddressFormatTest.java b/test/org/traccar/geocoder/AddressFormatTest.java index 85bb44fd1..0cc5168ef 100644 --- a/test/org/traccar/geocoder/AddressFormatTest.java +++ b/test/org/traccar/geocoder/AddressFormatTest.java @@ -1,12 +1,13 @@ package org.traccar.geocoder; -import org.junit.Assert; import org.junit.Test; +import static org.junit.Assert.assertEquals; + public class AddressFormatTest { private void test(Address address, String format, String expected) { - Assert.assertEquals(expected, new AddressFormat(format).format(address)); + assertEquals(expected, new AddressFormat(format).format(address)); } @Test diff --git a/test/org/traccar/geocoder/GeocoderTest.java b/test/org/traccar/geocoder/GeocoderTest.java index 7c6208048..8cf6ac524 100644 --- a/test/org/traccar/geocoder/GeocoderTest.java +++ b/test/org/traccar/geocoder/GeocoderTest.java @@ -2,10 +2,11 @@ package org.traccar.geocoder; import java.util.Locale; -import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; +import static org.junit.Assert.assertEquals; + public class GeocoderTest { @Ignore @@ -44,9 +45,9 @@ public class GeocoderTest { public void onFailure(final Throwable e) { } }); - Assert.assertEquals("1 Ibn Shaprut St, Jerusalem, Jerusalem District, IL", waitAddress()); + assertEquals("1 Ibn Shaprut St, Jerusalem, Jerusalem District, IL", waitAddress()); - Assert.assertEquals("1 Ibn Shaprut St, Jerusalem, Jerusalem District, IL", + assertEquals("1 Ibn Shaprut St, Jerusalem, Jerusalem District, IL", geocoder.getAddress(31.776797, 35.211489, null)); } @@ -63,9 +64,9 @@ public class GeocoderTest { public void onFailure(Throwable e) { } }); - Assert.assertEquals("35 West 9th Street, NYC, New York, US", waitAddress()); + assertEquals("35 West 9th Street, NYC, New York, US", waitAddress()); - Assert.assertEquals("35 West 9th Street, NYC, New York, US", + assertEquals("35 West 9th Street, NYC, New York, US", geocoder.getAddress(40.7337807, -73.9974401, null)); } @@ -82,9 +83,9 @@ public class GeocoderTest { public void onFailure(Throwable e) { } }); - Assert.assertEquals("Rue du Jardinet, Paris, FR", waitAddress()); + assertEquals("Rue du Jardinet, Paris, Île-de-France, FR", waitAddress()); - Assert.assertEquals("Rue du Jardinet, Paris, FR", geocoder.getAddress(48.8530000, 2.3400000, null)); + assertEquals("Rue du Jardinet, Paris, Île-de-France, FR", geocoder.getAddress(48.8530000, 2.3400000, null)); } public void testOpenCage() throws InterruptedException { @@ -101,9 +102,9 @@ public class GeocoderTest { public void onFailure(Throwable e) { } }); - Assert.assertEquals("Charleston Road, California, US", waitAddress()); + assertEquals("Charleston Road, California, US", waitAddress()); - Assert.assertEquals("Charleston Road, California, US", geocoder.getAddress(34.116302, -118.051519, null)); + assertEquals("Charleston Road, California, US", geocoder.getAddress(34.116302, -118.051519, null)); } public void testGeocodeFarm() throws InterruptedException { @@ -119,9 +120,9 @@ public class GeocoderTest { public void onFailure(Throwable e) { } }); - Assert.assertEquals("Estrella Avenue, Arcadia, California, United States", waitAddress()); + assertEquals("Estrella Avenue, Arcadia, California, United States", waitAddress()); - Assert.assertEquals("Estrella Avenue, Arcadia, California, United States", + assertEquals("Estrella Avenue, Arcadia, California, United States", geocoder.getAddress(34.116302, -118.051519, null)); } |