Skip to content

Instantly share code, notes, and snippets.

@rafaeltoledo
Created December 22, 2015 15:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rafaeltoledo/318338c751d07ea7df0d to your computer and use it in GitHub Desktop.
Save rafaeltoledo/318338c751d07ea7df0d to your computer and use it in GitHub Desktop.
@RunWith(AndroidJUnit4.class)
@LargeTest
public class MainActivityTest {
@Rule
public ActivityTestRule<MainActivity> rule = new ActivityTestRule<>(MainActivity.class);
@Test
public void shouldUpdateTextAfterButtonClick() {
onView(withId(R.id.button)).perform(click());
onView(withId(R.id.text)).check(matches(withText("Hello World!")));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment