From 6ec22b7a68b5334e215662e4cb83a20f9a1cad18 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Wed, 18 Nov 2015 14:01:00 +1300 Subject: Implement OpenCellID location provider --- test/org/traccar/location/LocationProviderTest.java | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'test/org/traccar') 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 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(); + } }); } -- cgit v1.2.3