Java 类android.support.test.espresso.core.deps.guava.collect.Lists 实例源码

项目:rx-twitter-stream-android    文件:StreamActivityTest.java   
private List<TweetViewModel> getTweetsList(int numberOfTweets) {
    List<TweetViewModel> tweetViewModels = Lists.newArrayList();
    for (int i = 0; i < numberOfTweets; i++) {
        tweetViewModels.add(new TweetViewModel("go reactive or go home", fakeBitmap, "2017.05.11 21:00", "John Doe"));
    }
    return tweetViewModels;
}
项目:Red-Calorie    文件:TagsActivityTest.java   
@Test
public void testSelectedTags() throws Exception {
    Intent intent = new Intent(TagsActivity.ACTION_PICK_TAG);
    intent.putExtra(TagsActivity.EXTRA_SELECTED_TAGS, Parcels.wrap(new Tags(Lists.newArrayList(exampleTags[0]))));
    main.launchActivity(intent);
    onView(tagsCheckboxFor(exampleTags[0])).check(matches(isChecked()));
    onView(tagsCheckboxFor(exampleTags[1])).check(matches(isNotChecked()));
    onView(tagsCheckboxFor(exampleTags[2]))
            .check(matches(isNotChecked()))
            .perform(click())
            .check(matches(isChecked()));
    onView(withId(R.id.tags_fab_confirm)).check(matches(isDisplayed()));
}