summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorŁukasz Paczos <lukas.paczos@gmail.com>2019-07-17 18:03:07 +0200
committerŁukasz Paczos <lukasz.paczos@mapbox.com>2019-07-18 10:54:39 +0200
commit048a07e3c916cfd66b93bd9624e04e437f79649e (patch)
tree1d90a2bc89f8baf21893cc08004cee3d19e22864
parent19aa8060b3a73c6ba4279db2a5ec28d02b2047e2 (diff)
downloadqtlocation-mapboxgl-048a07e3c916cfd66b93bd9624e04e437f79649e.tar.gz
[android] fail MapSnapshotter test in case of an error returned from core
-rw-r--r--platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/snapshotter/MapSnapshotterTest.kt7
1 files changed, 5 insertions, 2 deletions
diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/snapshotter/MapSnapshotterTest.kt b/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/snapshotter/MapSnapshotterTest.kt
index 5044c077a8..ca8451a24b 100644
--- a/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/snapshotter/MapSnapshotterTest.kt
+++ b/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/snapshotter/MapSnapshotterTest.kt
@@ -6,6 +6,7 @@ import com.mapbox.mapboxsdk.camera.CameraPosition
import com.mapbox.mapboxsdk.geometry.LatLng
import com.mapbox.mapboxsdk.maps.Style
import com.mapbox.mapboxsdk.testapp.activity.FeatureOverviewActivity
+import junit.framework.Assert
import junit.framework.Assert.assertNotNull
import org.junit.Rule
import org.junit.Test
@@ -39,11 +40,13 @@ class MapSnapshotterTest {
.build()
)
val mapSnapshotter = MapSnapshotter(rule.activity, options)
- mapSnapshotter.start {
+ mapSnapshotter.start({
assertNotNull(it)
assertNotNull(it.bitmap)
countDownLatch.countDown()
- }
+ }, {
+ Assert.fail(it)
+ })
}
if (!countDownLatch.await(30, TimeUnit.SECONDS)) {
throw TimeoutException()