aboutsummaryrefslogtreecommitdiff
path: root/test/org/traccar
diff options
context:
space:
mode:
Diffstat (limited to 'test/org/traccar')
-rw-r--r--test/org/traccar/geocode/ReverseGeocoderTest.java30
1 files changed, 25 insertions, 5 deletions
diff --git a/test/org/traccar/geocode/ReverseGeocoderTest.java b/test/org/traccar/geocode/ReverseGeocoderTest.java
index 2b0c30779..eab147cd5 100644
--- a/test/org/traccar/geocode/ReverseGeocoderTest.java
+++ b/test/org/traccar/geocode/ReverseGeocoderTest.java
@@ -35,9 +35,13 @@ public class ReverseGeocoderTest {
reverseGeocoder.getAddress(new AddressFormat(), 37.4217550, -122.0846330, new ReverseGeocoder.ReverseGeocoderCallback() {
@Override
- public void onResult(String address) {
+ public void onSuccess(String address) {
setAddress(address);
}
+
+ @Override
+ public void onFailure(Throwable e) {
+ }
});
Assert.assertEquals("1600 Amphitheatre Pkwy, Mountain View, CA, US", waitAddress());
}
@@ -47,9 +51,13 @@ public class ReverseGeocoderTest {
reverseGeocoder.getAddress(new AddressFormat(), 40.7337807, -73.9974401, new ReverseGeocoder.ReverseGeocoderCallback() {
@Override
- public void onResult(String address) {
+ public void onSuccess(String address) {
setAddress(address);
}
+
+ @Override
+ public void onFailure(Throwable e) {
+ }
});
Assert.assertEquals("35 West 9th Street, NYC, New York, US", waitAddress());
}
@@ -59,9 +67,13 @@ public class ReverseGeocoderTest {
reverseGeocoder.getAddress(new AddressFormat(), 48.8530000, 2.3400000, new ReverseGeocoder.ReverseGeocoderCallback() {
@Override
- public void onResult(String address) {
+ public void onSuccess(String address) {
setAddress(address);
}
+
+ @Override
+ public void onFailure(Throwable e) {
+ }
});
Assert.assertEquals("Rue du Jardinet, Paris, FR", waitAddress());
}
@@ -72,9 +84,13 @@ public class ReverseGeocoderTest {
reverseGeocoder.getAddress(new AddressFormat(), 34.116302, -118.051519, new ReverseGeocoder.ReverseGeocoderCallback() {
@Override
- public void onResult(String address) {
+ public void onSuccess(String address) {
setAddress(address);
}
+
+ @Override
+ public void onFailure(Throwable e) {
+ }
});
Assert.assertEquals("Charleston Road, California, US", waitAddress());
}
@@ -84,9 +100,13 @@ public class ReverseGeocoderTest {
reverseGeocoder.getAddress(new AddressFormat(), 34.116302, -118.051519, new ReverseGeocoder.ReverseGeocoderCallback() {
@Override
- public void onResult(String address) {
+ public void onSuccess(String address) {
setAddress(address);
}
+
+ @Override
+ public void onFailure(Throwable e) {
+ }
});
Assert.assertEquals("Estrella Avenue, Arcadia, California, United States", waitAddress());
}