[android] - bring back style loading test to native map, add onDestroy to after test
This commit is contained in:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user