diff options
Diffstat (limited to 'platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/feature/QueryRenderedFeaturesBoxCountTest.java')
-rw-r--r-- | platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/feature/QueryRenderedFeaturesBoxCountTest.java | 28 |
1 files changed, 5 insertions, 23 deletions
diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/feature/QueryRenderedFeaturesBoxCountTest.java b/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/feature/QueryRenderedFeaturesBoxCountTest.java index f49296a164..5ef93c72b3 100644 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/feature/QueryRenderedFeaturesBoxCountTest.java +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/feature/QueryRenderedFeaturesBoxCountTest.java @@ -1,16 +1,10 @@ package com.mapbox.mapboxsdk.testapp.feature; -import android.support.test.espresso.Espresso; -import android.support.test.rule.ActivityTestRule; - import com.mapbox.mapboxsdk.testapp.R; +import com.mapbox.mapboxsdk.testapp.activity.BaseActivityTest; import com.mapbox.mapboxsdk.testapp.activity.feature.QueryRenderedFeaturesBoxCountActivity; -import com.mapbox.mapboxsdk.testapp.utils.OnMapReadyIdlingResource; -import org.junit.After; -import org.junit.Before; import org.junit.Ignore; -import org.junit.Rule; import org.junit.Test; import static android.support.test.espresso.Espresso.onView; @@ -27,18 +21,11 @@ import static org.hamcrest.Matchers.not; * Instrumentation test to validate if clicking on the blue rectangle from * QueryRenderedFeaturesBoxSymbolCountActivity shows a Toast that 149 features were found. */ -public class QueryRenderedFeaturesBoxCountTest { - - @Rule - public final ActivityTestRule<QueryRenderedFeaturesBoxCountActivity> rule = - new ActivityTestRule<>(QueryRenderedFeaturesBoxCountActivity.class); - - private OnMapReadyIdlingResource idlingResource; +public class QueryRenderedFeaturesBoxCountTest extends BaseActivityTest { - @Before - public void registerIdlingResource() { - idlingResource = new OnMapReadyIdlingResource(rule.getActivity()); - Espresso.registerIdlingResources(idlingResource); + @Override + protected Class getActivityClass() { + return QueryRenderedFeaturesBoxCountActivity.class; } @Test @@ -53,9 +40,4 @@ public class QueryRenderedFeaturesBoxCountTest { .check(matches(isDisplayed())); } - @After - public void unregisterIdlingResource() { - Espresso.unregisterIdlingResources(idlingResource); - } - } |