aboutsummaryrefslogtreecommitdiff
path: root/test/org/traccar/location/LocationProviderTest.java
diff options
context:
space:
mode:
Diffstat (limited to 'test/org/traccar/location/LocationProviderTest.java')
-rw-r--r--test/org/traccar/location/LocationProviderTest.java15
1 files changed, 10 insertions, 5 deletions
diff --git a/test/org/traccar/location/LocationProviderTest.java b/test/org/traccar/location/LocationProviderTest.java
index c4aedbb09..b7280cfea 100644
--- a/test/org/traccar/location/LocationProviderTest.java
+++ b/test/org/traccar/location/LocationProviderTest.java
@@ -24,20 +24,25 @@ public class LocationProviderTest {
}
public void testOpenCellId() {
- OpenCellIdLocationProvider locationProvider = new OpenCellIdLocationProvider();
+ OpenCellIdLocationProvider locationProvider = new OpenCellIdLocationProvider("fake");
Map<String, Object> attributes = new HashMap<>();
- attributes.put(Event.KEY_MCC, 250);
+ attributes.put(Event.KEY_MCC, 260);
attributes.put(Event.KEY_MNC, 2);
- attributes.put(Event.KEY_LAC, 4711);
- attributes.put(Event.KEY_CID, 7989334);
+ attributes.put(Event.KEY_LAC, 10250);
+ attributes.put(Event.KEY_CID, 26511);
locationProvider.getLocation(attributes, new LocationProvider.LocationProviderCallback() {
@Override
- public void onResult(double latitude, double longitude) {
+ public void onSuccess(double latitude, double longitude) {
Assert.assertEquals(60.07254, latitude, 0.00001);
Assert.assertEquals(30.30996, longitude, 0.00001);
}
+
+ @Override
+ public void onFailure() {
+ Assert.fail();
+ }
});
}