aboutsummaryrefslogtreecommitdiffstats
path: root/tests/src/cgeo/geocaching/activity/waypoint/AddWaypointMultiTest.java
diff options
context:
space:
mode:
authorBananeweizen <bananeweizen@gmx.de>2014-09-11 07:19:40 +0200
committerBananeweizen <bananeweizen@gmx.de>2014-09-11 07:19:40 +0200
commitf4a281397ed951223a1d5cf08ba104c6edeb61e6 (patch)
treeb8acd891ef66ccff484befd1dc41fd1ec6303744 /tests/src/cgeo/geocaching/activity/waypoint/AddWaypointMultiTest.java
parenta3f82d1f5555f0796b4f574145ce62551a97dff4 (diff)
downloadcgeo-f4a281397ed951223a1d5cf08ba104c6edeb61e6.zip
cgeo-f4a281397ed951223a1d5cf08ba104c6edeb61e6.tar.gz
cgeo-f4a281397ed951223a1d5cf08ba104c6edeb61e6.tar.bz2
refactor espresso test hierarchy
introduce common super class with convenience methods
Diffstat (limited to 'tests/src/cgeo/geocaching/activity/waypoint/AddWaypointMultiTest.java')
-rw-r--r--tests/src/cgeo/geocaching/activity/waypoint/AddWaypointMultiTest.java34
1 files changed, 34 insertions, 0 deletions
diff --git a/tests/src/cgeo/geocaching/activity/waypoint/AddWaypointMultiTest.java b/tests/src/cgeo/geocaching/activity/waypoint/AddWaypointMultiTest.java
new file mode 100644
index 0000000..c66c8de
--- /dev/null
+++ b/tests/src/cgeo/geocaching/activity/waypoint/AddWaypointMultiTest.java
@@ -0,0 +1,34 @@
+package cgeo.geocaching.activity.waypoint;
+
+import cgeo.geocaching.Geocache;
+import cgeo.geocaching.R;
+import cgeo.geocaching.enumerations.CacheType;
+import cgeo.geocaching.enumerations.WaypointType;
+
+import com.google.android.apps.common.testing.ui.espresso.ViewInteraction;
+
+import static com.google.android.apps.common.testing.ui.espresso.Espresso.onView;
+
+import static com.google.android.apps.common.testing.ui.espresso.assertion.ViewAssertions.matches;
+
+import static com.google.android.apps.common.testing.ui.espresso.matcher.ViewMatchers.isDisplayed;
+import static com.google.android.apps.common.testing.ui.espresso.matcher.ViewMatchers.withChild;
+import static com.google.android.apps.common.testing.ui.espresso.matcher.ViewMatchers.withId;
+import static com.google.android.apps.common.testing.ui.espresso.matcher.ViewMatchers.withText;
+
+public class AddWaypointMultiTest extends AbstractAddWaypointActivityTest {
+
+ @Override
+ protected Geocache createTestCache() {
+ final Geocache cache = super.createTestCache();
+ cache.setType(CacheType.MULTI);
+ return cache;
+ }
+
+ public static void testMysteryDefaultWaypointFinal() {
+ final ViewInteraction waypointTypeSelector = onView(withId(R.id.type));
+ waypointTypeSelector.check(matches(isDisplayed()));
+ waypointTypeSelector.check(matches(withChild(withText(WaypointType.STAGE.getL10n()))));
+ }
+
+}