@Test public void matchesAny() throws Exception { Collection<TargetScreen> targetScreens = ImmutableList.of( TargetScreen.forScope("scope0"), TargetScreen.forScope("scope1") ); screen.setActivity(Robolectric.buildActivity(ActivityA.class).get()); screen.enterScope("scope1", null); assertTrue(screen.matchesAny(targetScreens)); }
public boolean matchesAny(Collection<TargetScreen> screens) { if (CollectionUtils.isNullOrEmpty(screens)) { return true; } for (TargetScreen targetScreen : screens) { if (matches(targetScreen)) { return true; } } return false; }
Screen { public boolean matchesAny(Collection<TargetScreen> screens) { if (CollectionUtils.isNullOrEmpty(screens)) { return true; } for (TargetScreen targetScreen : screens) { if (matches(targetScreen)) { return true; } } return false; } }
Screen { public boolean matchesAny(Collection<TargetScreen> screens) { if (CollectionUtils.isNullOrEmpty(screens)) { return true; } for (TargetScreen targetScreen : screens) { if (matches(targetScreen)) { return true; } } return false; } Screen(Activity activity, String scopeName); }
Screen { public boolean matchesAny(Collection<TargetScreen> screens) { if (CollectionUtils.isNullOrEmpty(screens)) { return true; } for (TargetScreen targetScreen : screens) { if (matches(targetScreen)) { return true; } } return false; } Screen(Activity activity, String scopeName); boolean matches(TargetScreen screen); boolean matchesAny(Collection<TargetScreen> screens); @Nullable View findTarget(int id); }
Screen { public boolean matchesAny(Collection<TargetScreen> screens) { if (CollectionUtils.isNullOrEmpty(screens)) { return true; } for (TargetScreen targetScreen : screens) { if (matches(targetScreen)) { return true; } } return false; } Screen(Activity activity, String scopeName); boolean matches(TargetScreen screen); boolean matchesAny(Collection<TargetScreen> screens); @Nullable View findTarget(int id);  }