blob: cfd563d00c94ef60a4baa43200780b3eff26bdfd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
package com.mapbox.mapboxsdk.maps
import androidx.test.platform.app.InstrumentationRegistry
import androidx.test.ext.junit.runners.AndroidJUnit4
import com.mapbox.mapboxsdk.AppCenter
import com.mapbox.mapboxsdk.style.layers.Layer
import org.junit.runner.RunWith
@RunWith(androidx.test.ext.junit.runners.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 = androidx.test.platform.app.InstrumentationRegistry.getContext()
nativeMapView = NativeMapView(context, false, null, null, NativeMapViewTest.DummyRenderer(context))
nativeMapView.resizeView(WIDTH, HEIGHT)
}
fun setupLayer(layer: Layer) {
nativeMapView.addLayer(layer)
}
}
|