diff options
Diffstat (limited to 'platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/location/LocationComponentTest.kt')
-rw-r--r-- | platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/location/LocationComponentTest.kt | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/location/LocationComponentTest.kt b/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/location/LocationComponentTest.kt index 01d8761cf3..dde03d8a14 100644 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/location/LocationComponentTest.kt +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/location/LocationComponentTest.kt @@ -594,15 +594,20 @@ class LocationComponentTest : EspressoTest() { val componentAction = object : LocationComponentAction.OnPerformLocationComponentAction { override fun onLocationComponentAction(component: LocationComponent, mapboxMap: MapboxMap, style: Style, uiController: UiController, context: Context) { - assertThat(component.isLocationComponentEnabled, `is`(false)) + component.onStop() component.onStart() - assertThat(component.isLocationComponentEnabled, `is`(false)) component.activateLocationComponent(LocationComponentActivationOptions .builder(context, style) .useDefaultLocationEngine(false) .build()) + + assertThat(component.isLocationComponentEnabled, `is`(false)) + component.onStop() + component.onStart() + assertThat(component.isLocationComponentEnabled, `is`(false)) + component.isLocationComponentEnabled = true assertThat(component.isLocationComponentEnabled, `is`(true)) } |