diff options
| author | Bananeweizen <bananeweizen@gmx.de> | 2014-09-11 07:19:40 +0200 |
|---|---|---|
| committer | Bananeweizen <bananeweizen@gmx.de> | 2014-09-11 07:19:40 +0200 |
| commit | f4a281397ed951223a1d5cf08ba104c6edeb61e6 (patch) | |
| tree | b8acd891ef66ccff484befd1dc41fd1ec6303744 /tests/src/cgeo/geocaching/activity/waypoint/AddWaypointMultiTest.java | |
| parent | a3f82d1f5555f0796b4f574145ce62551a97dff4 (diff) | |
| download | cgeo-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.java | 34 |
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())))); + } + +} |
