summaryrefslogtreecommitdiff
path: root/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/activity/activity.junit.ejs
diff options
context:
space:
mode:
authorTobrun <tobrun.van.nuland@gmail.com>2016-08-17 08:53:33 +0200
committerGitHub <noreply@github.com>2016-08-17 08:53:33 +0200
commitfff0ebaa1754aabd9584c994624b7b948bec95af (patch)
tree745006b1a761856e6651738cd7d26e0e08c6cbbf /platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/activity/activity.junit.ejs
parent0062cf2f949fe1b0080e2de45aaf0b3d5e028bf3 (diff)
downloadqtlocation-mapboxgl-fff0ebaa1754aabd9584c994624b7b948bec95af.tar.gz
5859 generate sanity tests (#5870)
* [android] #5859 - generate espresso tests [android] #5859 - cleanup xml files, use all the same resource id for map view [android] #5859 - update scripts [android] #5859 - update Activity to match mapboxMap naming [android] #5859 - make SurfaceViewMediaControlActivity compatible [android] #5859 - make MarkerViewScaleActivity test generation compatible [android] #5859 - make PolygonActivity test generation compatible [android] #5859 - integration within make file [android] #5859 - made CameraPostion generation safe [android] #5859 - generate sanity test [android] #5859 - add generated test cases [android] #5859 - add documentation * [android] #5859 - remove generated files, introduce gen package, added gitignore to package * [android] #5859 - regenerated test code * [android] #5859 - added AWS gradle plugin + bitrise configuration * [android] #5859 - fixes running locally without having the properties configured * [android] #6010 - remove python from android sdk * [android] #5859 - update docs about aws gradle plugin
Diffstat (limited to 'platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/activity/activity.junit.ejs')
-rw-r--r--platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/activity/activity.junit.ejs37
1 files changed, 37 insertions, 0 deletions
diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/activity/activity.junit.ejs b/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/activity/activity.junit.ejs
new file mode 100644
index 0000000000..df75f8633d
--- /dev/null
+++ b/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/activity/activity.junit.ejs
@@ -0,0 +1,37 @@
+<%
+ const activity = locals[0];
+ const subPackage = locals[1];
+-%>
+// This file is generated. Edit android/platform/scripts/generate-test-code.js, then run `make generate-test-android`.
+package com.mapbox.mapboxsdk.activity.gen.<%- subPackage %>;
+
+import android.support.test.runner.AndroidJUnit4;
+
+import com.mapbox.mapboxsdk.activity.BaseTest;
+import com.mapbox.mapboxsdk.testapp.R;
+import com.mapbox.mapboxsdk.testapp.activity.<%- subPackage %>.<%- activity %>;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+import static android.support.test.espresso.Espresso.onView;
+import static android.support.test.espresso.assertion.ViewAssertions.matches;
+import static android.support.test.espresso.matcher.ViewMatchers.isDisplayed;
+import static android.support.test.espresso.matcher.ViewMatchers.withId;
+
+/**
+ * Sanity test for <%- activity %>
+ */
+@RunWith(AndroidJUnit4.class)
+public class <%- activity %>Test extends BaseTest {
+
+ @Test
+ public void testSanity() {
+ onView(withId(R.id.mapView)).check(matches(isDisplayed()));
+ }
+
+ @Override
+ protected Class getActivityClass() {
+ return <%- activity %>.class;
+ }
+}