@Test public void copesWithNullsAndUnknownTypes() { Matcher<?> matcher = hasItem(equalTo("irrelevant")); assertNullSafe(matcher); assertUnknownTypeSafe(matcher); }
public static <T> Matcher<Iterable<? super T>> hasItem(Matcher<? super T> itemMatcher) { return new IsIterableContaining<>(itemMatcher); }
IsIterableContaining extends TypeSafeDiagnosingMatcher<Iterable<? super T>> { public static <T> Matcher<Iterable<? super T>> hasItem(Matcher<? super T> itemMatcher) { return new IsIterableContaining<>(itemMatcher); } }
IsIterableContaining extends TypeSafeDiagnosingMatcher<Iterable<? super T>> { public static <T> Matcher<Iterable<? super T>> hasItem(Matcher<? super T> itemMatcher) { return new IsIterableContaining<>(itemMatcher); } IsIterableContaining(Matcher<? super T> elementMatcher); }
IsIterableContaining extends TypeSafeDiagnosingMatcher<Iterable<? super T>> { public static <T> Matcher<Iterable<? super T>> hasItem(Matcher<? super T> itemMatcher) { return new IsIterableContaining<>(itemMatcher); } IsIterableContaining(Matcher<? super T> elementMatcher); @Override void describeTo(Description description); static Matcher<Iterable<? super T>> hasItem(Matcher<? super T> itemMatcher); static Matcher<Iterable<? super T>> hasItem(T item); @SafeVarargs static Matcher<Iterable<T>> hasItems(Matcher<? super T>... itemMatchers); @SafeVarargs static Matcher<Iterable<T>> hasItems(T... items); }
IsIterableContaining extends TypeSafeDiagnosingMatcher<Iterable<? super T>> { public static <T> Matcher<Iterable<? super T>> hasItem(Matcher<? super T> itemMatcher) { return new IsIterableContaining<>(itemMatcher); } IsIterableContaining(Matcher<? super T> elementMatcher); @Override void describeTo(Description description); static Matcher<Iterable<? super T>> hasItem(Matcher<? super T> itemMatcher); static Matcher<Iterable<? super T>> hasItem(T item); @SafeVarargs static Matcher<Iterable<T>> hasItems(Matcher<? super T>... itemMatchers); @SafeVarargs static Matcher<Iterable<T>> hasItems(T... items);  }