aboutsummaryrefslogtreecommitdiff
path: root/src/test/java/org/traccar/geocoder/GeocoderTest.java
diff options
context:
space:
mode:
authorIván Ávalos <avalos@disroot.org>2024-08-03 20:52:00 -0600
committerIván Ávalos <avalos@disroot.org>2024-08-03 20:52:00 -0600
commit55f6d92c09a5b1d8566b53633d07be3d31010d3b (patch)
treeb86bed801b0bbadb72c7e839296dae1d28b12bbb /src/test/java/org/traccar/geocoder/GeocoderTest.java
parentc04ad7d48331253c095fc123ded1b00f6ff871d3 (diff)
parent2788174193def918a3a1a5be3bbed24c9613323f (diff)
downloadtrackermap-server-55f6d92c09a5b1d8566b53633d07be3d31010d3b.tar.gz
trackermap-server-55f6d92c09a5b1d8566b53633d07be3d31010d3b.tar.bz2
trackermap-server-55f6d92c09a5b1d8566b53633d07be3d31010d3b.zip
Merge tag 'tags/v6.3'
Diffstat (limited to 'src/test/java/org/traccar/geocoder/GeocoderTest.java')
-rw-r--r--src/test/java/org/traccar/geocoder/GeocoderTest.java13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/test/java/org/traccar/geocoder/GeocoderTest.java b/src/test/java/org/traccar/geocoder/GeocoderTest.java
index ef2dd062d..2aa7ab77c 100644
--- a/src/test/java/org/traccar/geocoder/GeocoderTest.java
+++ b/src/test/java/org/traccar/geocoder/GeocoderTest.java
@@ -20,7 +20,7 @@ public class GeocoderTest {
@Disabled
@Test
public void testGoogle() {
- Geocoder geocoder = new GoogleGeocoder(client, null, null, 0, new AddressFormat());
+ Geocoder geocoder = new GoogleGeocoder(client, null, null, null, 0, new AddressFormat());
String address = geocoder.getAddress(31.776797, 35.211489, null);
assertEquals("1 Ibn Shaprut St, Jerusalem, Jerusalem District, IL", address);
}
@@ -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
@@ -122,4 +122,11 @@ public class GeocoderTest {
assertEquals("114 East 13th Street, New York, New York, US", address);
}
+ @Disabled
+ @Test
+ 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);
+ }
}