aboutsummaryrefslogtreecommitdiffstats
path: root/tests/src/cgeo/geocaching/waypointactivity/EditWaypointActivityTest.java
diff options
context:
space:
mode:
Diffstat (limited to 'tests/src/cgeo/geocaching/waypointactivity/EditWaypointActivityTest.java')
-rw-r--r--tests/src/cgeo/geocaching/waypointactivity/EditWaypointActivityTest.java29
1 files changed, 29 insertions, 0 deletions
diff --git a/tests/src/cgeo/geocaching/waypointactivity/EditWaypointActivityTest.java b/tests/src/cgeo/geocaching/waypointactivity/EditWaypointActivityTest.java
new file mode 100644
index 0000000..eda86cc
--- /dev/null
+++ b/tests/src/cgeo/geocaching/waypointactivity/EditWaypointActivityTest.java
@@ -0,0 +1,29 @@
+package cgeo.geocaching.waypointactivity;
+
+import cgeo.geocaching.R;
+
+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.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;
+
+import static org.assertj.core.api.Assertions.assertThat;
+
+public class EditWaypointActivityTest extends AbstractEditWaypointActivityTest {
+
+ public void testFieldsAreNotEmpty() {
+ String name = getWaypoint().getName();
+ assertThat(name).isNotEmpty();
+ onView(withId(R.id.name)).check(matches(withText(name)));
+
+ final String note = getWaypoint().getNote();
+ assertThat(note).isNotEmpty();
+ onView(withId(R.id.note)).check(matches(withText(note)));
+
+ onView(withId(R.id.type)).check(matches(withChild(withText(getWaypoint().getWaypointType().getL10n()))));
+ }
+
+}