summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--platform/android/MapboxGLAndroidSDK/src/test/java/com/mapbox/mapboxsdk/location/LocationComponentTest.kt16
1 files changed, 16 insertions, 0 deletions
diff --git a/platform/android/MapboxGLAndroidSDK/src/test/java/com/mapbox/mapboxsdk/location/LocationComponentTest.kt b/platform/android/MapboxGLAndroidSDK/src/test/java/com/mapbox/mapboxsdk/location/LocationComponentTest.kt
index 0f316fa483..1928f692e1 100644
--- a/platform/android/MapboxGLAndroidSDK/src/test/java/com/mapbox/mapboxsdk/location/LocationComponentTest.kt
+++ b/platform/android/MapboxGLAndroidSDK/src/test/java/com/mapbox/mapboxsdk/location/LocationComponentTest.kt
@@ -105,6 +105,14 @@ class LocationComponentTest {
}
@Test
+ fun activateWithDefaultLocationEngineAndOptionsTestDefaultLocationEngine() {
+ locationComponent.activateLocationComponent(context, mockk(), true, locationComponentOptions)
+ Assert.assertNotNull(locationComponent.locationComponentOptions)
+ Assert.assertEquals(locationComponentOptions.foregroundName(), locationComponent.locationComponentOptions.foregroundName())
+ Assert.assertEquals(locationComponentOptions.accuracyColor(), locationComponent.locationComponentOptions.accuracyColor())
+ }
+
+ @Test
fun activateWithDefaultLocationEngineRequestAndOptionsTestCustomLocationEngine() {
locationComponent.activateLocationComponent(context, mockk(), false, locationEngineRequest, locationComponentOptions)
Assert.assertEquals(locationEngineRequest, locationComponent.locationEngineRequest)
@@ -112,6 +120,14 @@ class LocationComponentTest {
}
@Test
+ fun activateWithDefaultLocationEngineAndOptionsTestCustomLocationEngine() {
+ locationComponent.activateLocationComponent(context, mockk(), false, locationComponentOptions)
+ Assert.assertNotNull(locationComponent.locationComponentOptions)
+ Assert.assertEquals(locationComponentOptions.foregroundName(), locationComponent.locationComponentOptions.foregroundName())
+ Assert.assertEquals(locationComponentOptions.accuracyColor(), locationComponent.locationComponentOptions.accuracyColor())
+ }
+
+ @Test
fun locationUpdatesWhenEnabledDisableTest() {
locationComponent.activateLocationComponent(context, mockk(), locationEngine, locationEngineRequest, locationComponentOptions)
verify(locationEngine, times(0)).removeLocationUpdates(currentListener)