summaryrefslogtreecommitdiff
path: root/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/feature/QueryRenderedSymbolBoxCountTest.java
diff options
context:
space:
mode:
Diffstat (limited to 'platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/feature/QueryRenderedSymbolBoxCountTest.java')
-rw-r--r--platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/feature/QueryRenderedSymbolBoxCountTest.java29
1 files changed, 5 insertions, 24 deletions
diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/feature/QueryRenderedSymbolBoxCountTest.java b/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/feature/QueryRenderedSymbolBoxCountTest.java
index ea80e8689a..a31c3db89e 100644
--- a/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/feature/QueryRenderedSymbolBoxCountTest.java
+++ b/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/feature/QueryRenderedSymbolBoxCountTest.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.QueryRenderedFeaturesBoxSymbolCountActivity;
-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 2 symbols were found.
*/
-public class QueryRenderedSymbolBoxCountTest {
-
- @Rule
- public final ActivityTestRule<QueryRenderedFeaturesBoxSymbolCountActivity> rule =
- new ActivityTestRule<>(QueryRenderedFeaturesBoxSymbolCountActivity.class);
-
- private OnMapReadyIdlingResource idlingResource;
+public class QueryRenderedSymbolBoxCountTest extends BaseActivityTest {
- @Before
- public void registerIdlingResource() {
- idlingResource = new OnMapReadyIdlingResource(rule.getActivity());
- Espresso.registerIdlingResources(idlingResource);
+ @Override
+ protected Class getActivityClass() {
+ return QueryRenderedFeaturesBoxSymbolCountActivity.class;
}
@Test
@@ -52,11 +39,5 @@ public class QueryRenderedSymbolBoxCountTest {
.inRoot(withDecorView(not(is(rule.getActivity().getWindow().getDecorView()))))
.check(matches(isDisplayed()));
}
-
- @After
- public void unregisterIdlingResource() {
- Espresso.unregisterIdlingResources(idlingResource);
- }
-
}