summaryrefslogtreecommitdiff
path: root/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/feature/QueryRenderedFeaturesHighlightTest.java
diff options
context:
space:
mode:
authorCameron Mace <cameron@mapbox.com>2016-12-16 16:19:15 -0500
committerGitHub <noreply@github.com>2016-12-16 16:19:15 -0500
commit20b958301eb208fe9ed0ae8edfb14b6f3741d8f2 (patch)
tree94ae0ce250cda159be13f9a21cc70c92d4908974 /platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/feature/QueryRenderedFeaturesHighlightTest.java
parentf95b4838ea816b9da0c151a953a1f98f97c79a39 (diff)
downloadqtlocation-mapboxgl-20b958301eb208fe9ed0ae8edfb14b6f3741d8f2.tar.gz
Adds checkstyle to CI (#7442)
* adds checkstyle to CI * fixed gradlew path * resolved testapp checkstyle violations * added back mapboxMap variable for test * checkstyle annotations * checkstyle SDK round 1 * maps package checkstyle * rest of SDK checkstyle * checkstyle gesture library * checkstyle test * finished rest of test checkstyle * resolved all checkstyle errors * fixed class name * removed old test file * fixed camera postion test * fixed native crash
Diffstat (limited to 'platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/feature/QueryRenderedFeaturesHighlightTest.java')
-rw-r--r--platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/feature/QueryRenderedFeaturesHighlightTest.java75
1 files changed, 38 insertions, 37 deletions
diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/feature/QueryRenderedFeaturesHighlightTest.java b/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/feature/QueryRenderedFeaturesHighlightTest.java
index 30cabd9753..b8cd46e612 100644
--- a/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/feature/QueryRenderedFeaturesHighlightTest.java
+++ b/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/feature/QueryRenderedFeaturesHighlightTest.java
@@ -34,47 +34,48 @@ import static org.hamcrest.Matchers.not;
*/
public class QueryRenderedFeaturesHighlightTest {
- @Rule
- public final ActivityTestRule<QueryRenderedFeaturesBoxHighlightActivity> rule = new ActivityTestRule<>(QueryRenderedFeaturesBoxHighlightActivity.class);
+ @Rule
+ public final ActivityTestRule<QueryRenderedFeaturesBoxHighlightActivity> rule =
+ new ActivityTestRule<>(QueryRenderedFeaturesBoxHighlightActivity.class);
- private OnMapReadyIdlingResource idlingResource;
+ private OnMapReadyIdlingResource idlingResource;
- @Before
- public void registerIdlingResource() {
- idlingResource = new OnMapReadyIdlingResource(rule.getActivity());
- Espresso.registerIdlingResources(idlingResource);
- }
+ @Before
+ public void registerIdlingResource() {
+ idlingResource = new OnMapReadyIdlingResource(rule.getActivity());
+ Espresso.registerIdlingResources(idlingResource);
+ }
- @Test
- @Ignore
- public void testCountFeatures() {
- // click on box to query map
- onView(withId(R.id.selection_box)).perform(click());
+ @Test
+ @Ignore
+ public void testCountFeatures() {
+ // click on box to query map
+ onView(withId(R.id.selection_box)).perform(click());
- // validate if toast is shown
- onView(withText("50 features in box"))
- .inRoot(withDecorView(not(is(rule.getActivity().getWindow().getDecorView()))))
- .check(matches(isDisplayed()));
- }
+ // validate if toast is shown
+ onView(withText("50 features in box"))
+ .inRoot(withDecorView(not(is(rule.getActivity().getWindow().getDecorView()))))
+ .check(matches(isDisplayed()));
+ }
- @After
- public void unregisterIdlingResource() {
- Espresso.unregisterIdlingResources(idlingResource);
- }
+ @After
+ public void unregisterIdlingResource() {
+ Espresso.unregisterIdlingResources(idlingResource);
+ }
- private static ViewAction clickXY(final float x, final float y) {
- return new GeneralClickAction(
- Tap.SINGLE,
- new CoordinatesProvider() {
- @Override
- public float[] calculateCoordinates(View view) {
- final int[] screenPos = new int[2];
- view.getLocationOnScreen(screenPos);
- final float screenX = screenPos[0] + x;
- final float screenY = screenPos[1] + y;
- return new float[]{screenX, screenY};
- }
- },
- Press.FINGER);
- }
+ private static ViewAction clickXY(final float x, final float y) {
+ return new GeneralClickAction(
+ Tap.SINGLE,
+ new CoordinatesProvider() {
+ @Override
+ public float[] calculateCoordinates(View view) {
+ final int[] screenPos = new int[2];
+ view.getLocationOnScreen(screenPos);
+ final float screenX = screenPos[0] + x;
+ final float screenY = screenPos[1] + y;
+ return new float[] {screenX, screenY};
+ }
+ },
+ Press.FINGER);
+ }
} \ No newline at end of file