summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortobrun <tobrun.van.nuland@gmail.com>2019-02-14 16:38:19 +0200
committertobrun <tobrun.van.nuland@gmail.com>2019-02-14 16:38:19 +0200
commit44734bb1f09ee2202c3d0be08da70ae06376388e (patch)
tree17da30ea6ccc7243b49ca344cefd37d47b54d3bd
parent3802f7e922e16a18c75d66aa615094f4c62fd0b1 (diff)
downloadqtlocation-mapboxgl-upstream/tvn-freeze-follow-up.tar.gz
[android] - bring back style loading test to native map, add onDestroy to after testupstream/tvn-freeze-follow-up
-rw-r--r--platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/maps/NativeMapViewTest.kt25
1 files changed, 25 insertions, 0 deletions
diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/maps/NativeMapViewTest.kt b/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/maps/NativeMapViewTest.kt
index 6958a3519c..d8cc10d4ab 100644
--- a/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/maps/NativeMapViewTest.kt
+++ b/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/maps/NativeMapViewTest.kt
@@ -13,6 +13,7 @@ import com.mapbox.mapboxsdk.maps.renderer.MapRenderer
import com.mapbox.mapboxsdk.style.layers.TransitionOptions
import com.mapbox.mapboxsdk.testapp.utils.TestConstants
import junit.framework.Assert.*
+import org.junit.After
import org.junit.Before
import org.junit.Test
import org.junit.runner.RunWith
@@ -41,6 +42,30 @@ class NativeMapViewTest {
nativeMapView.resizeView(WIDTH, HEIGHT)
}
+ @After
+ @UiThreadTest
+ fun after() {
+ nativeMapView.destroy()
+ }
+
+ @Test
+ @UiThreadTest
+ fun testSetStyleUrl() {
+ val expected = Style.DARK
+ nativeMapView.styleUrl = expected
+ val actual = nativeMapView.styleUrl
+ assertEquals("Style URL should match", expected, actual)
+ }
+
+ @Test
+ @UiThreadTest
+ fun testSetStyleJson() {
+ val expected = "{}"
+ nativeMapView.styleJson = expected
+ val actual = nativeMapView.styleJson
+ assertEquals("Style JSON should match", expected, actual)
+ }
+
@Test
@UiThreadTest
fun testBearing() {