[android] - fix thread assertion issue while running instrumentation tests

This commit is contained in:
tobrun
2019-03-27 15:12:46 +01:00
committed by Tobrun
parent 7af00a404f
commit 21155772ef

View File

@@ -1,5 +1,6 @@
package com.mapbox.mapboxsdk.maps;
import android.support.test.annotation.UiThreadTest;
import android.support.test.runner.AndroidJUnit4;
import com.mapbox.mapboxsdk.Mapbox;
import org.junit.Test;
@@ -16,6 +17,7 @@ public class MapboxTest {
private static final String ACCESS_TOKEN_2 = "pk.0000000002";
@Test
@UiThreadTest
public void testConnected() {
assertTrue(Mapbox.isConnected());
@@ -31,6 +33,7 @@ public class MapboxTest {
}
@Test
@UiThreadTest
public void setAccessToken() {
String realToken = Mapbox.getAccessToken();
Mapbox.setAccessToken(ACCESS_TOKEN);