aboutsummaryrefslogtreecommitdiff
path: root/test/org/traccar/geocoder/GeocoderTest.java
diff options
context:
space:
mode:
Diffstat (limited to 'test/org/traccar/geocoder/GeocoderTest.java')
-rw-r--r--test/org/traccar/geocoder/GeocoderTest.java18
1 files changed, 8 insertions, 10 deletions
diff --git a/test/org/traccar/geocoder/GeocoderTest.java b/test/org/traccar/geocoder/GeocoderTest.java
index 012f8bacd..a5aecc8cf 100644
--- a/test/org/traccar/geocoder/GeocoderTest.java
+++ b/test/org/traccar/geocoder/GeocoderTest.java
@@ -1,17 +1,15 @@
package org.traccar.geocoder;
import org.junit.Assert;
+import org.junit.Ignore;
import org.junit.Test;
public class GeocoderTest {
- private boolean enable = false;
-
+ @Ignore
@Test
public void test() throws InterruptedException {
- if (enable) {
- testGeocodeFarm();
- }
+ testGoogle();
}
private String address;
@@ -31,9 +29,9 @@ public class GeocoderTest {
}
public void testGoogle() throws InterruptedException {
- Geocoder geocoder = new GoogleGeocoder();
+ Geocoder geocoder = new GoogleGeocoder(null, null, 0);
- geocoder.getAddress(new AddressFormat(), 37.4217550, -122.0846330, new Geocoder.ReverseGeocoderCallback() {
+ geocoder.getAddress(new AddressFormat(), 31.776797, 35.211489, new Geocoder.ReverseGeocoderCallback() {
@Override
public void onSuccess(String address) {
setAddress(address);
@@ -43,11 +41,11 @@ public class GeocoderTest {
public void onFailure(Throwable e) {
}
});
- Assert.assertEquals("1600 Amphitheatre Pkwy, Mountain View, CA, US", waitAddress());
+ Assert.assertEquals("1 Ibn Shaprut St, Jerusalem, Jerusalem District, IL", waitAddress());
}
public void testNominatim() throws InterruptedException {
- Geocoder geocoder = new NominatimGeocoder();
+ Geocoder geocoder = new NominatimGeocoder(null, null, 0);
geocoder.getAddress(new AddressFormat(), 40.7337807, -73.9974401, new Geocoder.ReverseGeocoderCallback() {
@Override
@@ -96,7 +94,7 @@ public class GeocoderTest {
}
public void testGeocodeFarm() throws InterruptedException {
- Geocoder geocoder = new GeocodeFarmGeocoder(0);
+ Geocoder geocoder = new GeocodeFarmGeocoder(null, 0);
geocoder.getAddress(new AddressFormat(), 34.116302, -118.051519, new Geocoder.ReverseGeocoderCallback() {
@Override