Files
MapLibreParticleLab/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/maps/BaseLayerTest.kt
Tobrun 0130763391 Update codebase to androidX (#129)
* update codebase to androidX
2020-01-08 13:46:13 +01:00

27 lines
821 B
Kotlin

package com.mapbox.mapboxsdk.maps
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.platform.app.InstrumentationRegistry
import com.mapbox.mapboxsdk.AppCenter
import com.mapbox.mapboxsdk.style.layers.Layer
import org.junit.runner.RunWith
@RunWith(AndroidJUnit4::class)
abstract class BaseLayerTest : AppCenter() {
private lateinit var nativeMapView: NativeMap
companion object {
const val WIDTH = 500
const val HEIGHT = WIDTH
}
fun before() {
val context = InstrumentationRegistry.getInstrumentation().context
nativeMapView = NativeMapView(context, false, null, null, NativeMapViewTest.DummyRenderer(context))
nativeMapView.resizeView(WIDTH, HEIGHT)
}
fun setupLayer(layer: Layer) {
nativeMapView.addLayer(layer)
}
}