package mobi.cangol.mobile.service.location;

import android.location.Location;
import android.test.ApplicationTestCase;

import mobi.cangol.mobile.CoreApplication;
import mobi.cangol.mobile.service.AppService;

/**
 * Created by weixuewu on 16/6/11.
 */
public class LocationServiceTest extends ApplicationTestCase<CoreApplication> {
    private static final String TAG = "LocationService";
    private CoreApplication coreApplication;
    private LocationService locationService;

    public LocationServiceTest() {
        super(CoreApplication.class);
    }

    public void setUp() throws Exception {
        super.setUp();
        createApplication();
        coreApplication = getApplication();
        locationService = (LocationService) coreApplication.getAppService(AppService.LOCATION_SERVICE);
    }

    public void testRequestLocationUpdates() {
        //locationService.requestLocationUpdates();
    }

    public void testRemoveLocationUpdates() {
        locationService.removeLocationUpdates();
    }

    public void testGetLastKnownLocation() {
        locationService.getLastKnownLocation();
    }

    public void testIsBetterLocation() {
        locationService.isBetterLocation(new Location(TAG));
    }

    public void testSetBetterLocationListener() {
        locationService.setBetterLocationListener(new BetterLocationListener() {
            @Override
            public void onBetterLocation(Location mLocation) {

            }

            @Override
            public void timeout(Location mLocation) {

            }
        });
    }
}
@@ -1346,32 +1346,231 @@
 ionListener() %7B%0A
+            @Override%0A            public void needPermission(String%5B%5D permissions) %7B%0A%0A            %7D%0A%0A            @Override%0A            public void providerDisabled(String provider) %7B%0A%0A            %7D%0A%0A
             @Ove
@@ -1723,32 +1723,110 @@
 n mLocation) %7B%0A%0A
+            %7D%0A%0A            @Override%0A            public void positioning() %7B%0A%0A
             %7D%0A  

fix androidTest bug