Skip to content

Instantly share code, notes, and snippets.

@go-cristian
Created April 18, 2016 19:55
Show Gist options
  • Save go-cristian/0c3c9d4c99aec82c3aa001e791f0da80 to your computer and use it in GitHub Desktop.
Save go-cristian/0c3c9d4c99aec82c3aa001e791f0da80 to your computer and use it in GitHub Desktop.
Test single component
@RunWith(AndroidJUnit4.class) @LargeTest public class RatesActivityShould {
@Rule public ActivityTestRule<RatesActivity> rule =
new ActivityTestRule<RatesActivity>(RatesActivity.class);
@Test public void show_rates_widget_on_load() throws Exception {
RatesActivity activity = rule.getActivity();
activity.setContentView(new AwesomeTextView(activity));
onView(isAssignableFrom(AwesomeTextView.class)).perform(typeText("ModerFoka"))
.check(matches(withText("Mother of a Foca")));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment