aboutsummaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorMatjaž Črnko <m.crnko@txt.si>2024-06-17 14:47:53 +0200
committerMatjaž Črnko <m.crnko@txt.si>2024-06-17 14:47:53 +0200
commit0530bdb6c644d67ed90231e902898e74532ef1b7 (patch)
treecbdada477e2a929b60b879a121489a977765c08e /src/test
parent3a3bc33a35122f8231fb145bd2958876a094e039 (diff)
downloadtrackermap-server-0530bdb6c644d67ed90231e902898e74532ef1b7.tar.gz
trackermap-server-0530bdb6c644d67ed90231e902898e74532ef1b7.tar.bz2
trackermap-server-0530bdb6c644d67ed90231e902898e74532ef1b7.zip
refactor: GeocodeJSON implementation and basing BanGeocoder on it.
Diffstat (limited to 'src/test')
-rw-r--r--src/test/java/org/traccar/geocoder/GeocoderTest.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/test/java/org/traccar/geocoder/GeocoderTest.java b/src/test/java/org/traccar/geocoder/GeocoderTest.java
index e05477ac3..fb2c5198f 100644
--- a/src/test/java/org/traccar/geocoder/GeocoderTest.java
+++ b/src/test/java/org/traccar/geocoder/GeocoderTest.java
@@ -69,9 +69,9 @@ public class GeocoderTest {
@Disabled
@Test
public void testBan() {
- Geocoder geocoder = new BanGeocoder(client, 0, new AddressFormat("%f [%d], %c"));
+ Geocoder geocoder = new BanGeocoder(client, 0, new AddressFormat());
String address = geocoder.getAddress(48.8575, 2.2944, null);
- assertEquals("8 Avenue Gustave Eiffel 75007 Paris [75, Paris, Île-de-France], FR", address);
+ assertEquals("8 Avenue Gustave Eiffel, Paris, FR", address);
}
@Disabled
@@ -124,8 +124,8 @@ public class GeocoderTest {
@Disabled
@Test
- public void testPhoton() {
- Geocoder geocoder = new PhotonGeocoder(client, null, null, null, 0, new AddressFormat());
+ public void testGeocodeJSON() {
+ Geocoder geocoder = new GeocodeJSONGeocoder(client, null, null, null, 0, new AddressFormat());
String address = geocoder.getAddress(40.7337807, -73.9974401, null);
assertEquals("35 West 9th Street, New York, New York, US", address);
}