aboutsummaryrefslogtreecommitdiff
path: root/test/org
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2015-11-18 14:01:00 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2015-11-18 14:01:00 +1300
commit6ec22b7a68b5334e215662e4cb83a20f9a1cad18 (patch)
tree7b8132f0a6d84611c1dde5c61afd16fea80f86f8 /test/org
parent78e325196729202e416655e87cf7d1593cda2cc7 (diff)
downloadtraccar-server-6ec22b7a68b5334e215662e4cb83a20f9a1cad18.tar.gz
traccar-server-6ec22b7a68b5334e215662e4cb83a20f9a1cad18.tar.bz2
traccar-server-6ec22b7a68b5334e215662e4cb83a20f9a1cad18.zip
Implement OpenCellID location provider
Diffstat (limited to 'test/org')
-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();
+ }
});
}