aboutsummaryrefslogtreecommitdiff
path: root/test/org/traccar/geocoder/GeocoderTest.java
diff options
context:
space:
mode:
authorjon-stumpf <jon.stumpf@gmail.com>2017-02-20 10:54:34 -0500
committerjon-stumpf <jon.stumpf@gmail.com>2017-02-20 10:54:34 -0500
commit888c392af40187f3a0ecc3395495db9acd85b827 (patch)
treebeb74dff8b8052ffb4a7d3c894b2b4e5a4434973 /test/org/traccar/geocoder/GeocoderTest.java
parent38249673287b908c0ca55847a35ca16a7b6a0c50 (diff)
parent2449895139fa658d082c1085185003a001225bc3 (diff)
downloadtraccar-server-888c392af40187f3a0ecc3395495db9acd85b827.tar.gz
traccar-server-888c392af40187f3a0ecc3395495db9acd85b827.tar.bz2
traccar-server-888c392af40187f3a0ecc3395495db9acd85b827.zip
Resolved conflict with master;
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