@Test public void Add() throws Exception { ArgumentCaptor<GeofencingAddSingleOnSubscribe> captor = ArgumentCaptor.forClass(GeofencingAddSingleOnSubscribe.class); rxLocation.geofencing().add(geofencingRequest, pendingIntent); rxLocation.geofencing().add(geofencingRequest, pendingIntent, TIMEOUT_TIME, TIMEOUT_TIMEUNIT); PowerMockito.verifyStatic(Single.class, times(2)); Single.create(captor.capture()); GeofencingAddSingleOnSubscribe single = captor.getAllValues().get(0); assertEquals(geofencingRequest, single.geofencingRequest); assertEquals(pendingIntent, single.pendingIntent); assertNoTimeoutSet(single); single = captor.getAllValues().get(1); assertEquals(geofencingRequest, single.geofencingRequest); assertEquals(pendingIntent, single.pendingIntent); assertTimeoutSet(single); }
@RequiresPermission(Manifest.permission.ACCESS_FINE_LOCATION) public Single<Status> add(@NonNull GeofencingRequest geofencingRequest, @NonNull PendingIntent pendingIntent) { return addInternal(geofencingRequest, pendingIntent, null, null); }
Geofencing { @RequiresPermission(Manifest.permission.ACCESS_FINE_LOCATION) public Single<Status> add(@NonNull GeofencingRequest geofencingRequest, @NonNull PendingIntent pendingIntent) { return addInternal(geofencingRequest, pendingIntent, null, null); } }
Geofencing { @RequiresPermission(Manifest.permission.ACCESS_FINE_LOCATION) public Single<Status> add(@NonNull GeofencingRequest geofencingRequest, @NonNull PendingIntent pendingIntent) { return addInternal(geofencingRequest, pendingIntent, null, null); } Geofencing(RxLocation rxLocation); }
Geofencing { @RequiresPermission(Manifest.permission.ACCESS_FINE_LOCATION) public Single<Status> add(@NonNull GeofencingRequest geofencingRequest, @NonNull PendingIntent pendingIntent) { return addInternal(geofencingRequest, pendingIntent, null, null); } Geofencing(RxLocation rxLocation); @RequiresPermission(Manifest.permission.ACCESS_FINE_LOCATION) Single<Status> add(@NonNull GeofencingRequest geofencingRequest, @NonNull PendingIntent pendingIntent); @RequiresPermission(Manifest.permission.ACCESS_FINE_LOCATION) Single<Status> add(@NonNull GeofencingRequest geofencingRequest, @NonNull PendingIntent pendingIntent, long timeoutTime, @NonNull TimeUnit timeoutUnit); Single<Status> remove(@NonNull List<String> geofenceRequestIds); Single<Status> remove(@NonNull List<String> geofenceRequestIds, long timeoutTime, @NonNull TimeUnit timeoutUnit); Single<Status> remove(@NonNull PendingIntent pendingIntent); Single<Status> remove(@NonNull PendingIntent pendingIntent, long timeoutTime, @NonNull TimeUnit timeoutUnit); }
Geofencing { @RequiresPermission(Manifest.permission.ACCESS_FINE_LOCATION) public Single<Status> add(@NonNull GeofencingRequest geofencingRequest, @NonNull PendingIntent pendingIntent) { return addInternal(geofencingRequest, pendingIntent, null, null); } Geofencing(RxLocation rxLocation); @RequiresPermission(Manifest.permission.ACCESS_FINE_LOCATION) Single<Status> add(@NonNull GeofencingRequest geofencingRequest, @NonNull PendingIntent pendingIntent); @RequiresPermission(Manifest.permission.ACCESS_FINE_LOCATION) Single<Status> add(@NonNull GeofencingRequest geofencingRequest, @NonNull PendingIntent pendingIntent, long timeoutTime, @NonNull TimeUnit timeoutUnit); Single<Status> remove(@NonNull List<String> geofenceRequestIds); Single<Status> remove(@NonNull List<String> geofenceRequestIds, long timeoutTime, @NonNull TimeUnit timeoutUnit); Single<Status> remove(@NonNull PendingIntent pendingIntent); Single<Status> remove(@NonNull PendingIntent pendingIntent, long timeoutTime, @NonNull TimeUnit timeoutUnit);  }