@SuppressWarnings({ "unchecked", "rawtypes" }) @Test public void providesConvenientShortcutForIsInstanceOf() { final Matcher matcher = isA(Number.class); assertMatches(matcher, 1); assertDoesNotMatch(matcher, new Object()); assertDoesNotMatch(matcher, null); }
public static <T> Matcher<T> isA(Class<?> type) { return is(IsInstanceOf.<T>instanceOf(type)); }
Is extends BaseMatcher<T> { public static <T> Matcher<T> isA(Class<?> type) { return is(IsInstanceOf.<T>instanceOf(type)); } }
Is extends BaseMatcher<T> { public static <T> Matcher<T> isA(Class<?> type) { return is(IsInstanceOf.<T>instanceOf(type)); } Is(Matcher<T> matcher); }
Is extends BaseMatcher<T> { public static <T> Matcher<T> isA(Class<?> type) { return is(IsInstanceOf.<T>instanceOf(type)); } Is(Matcher<T> matcher); @Override boolean matches(Object arg); @Override void describeTo(Description description); @Override void describeMismatch(Object item, Description mismatchDescription); static Matcher<T> is(Matcher<T> matcher); static Matcher<T> is(T value); static Matcher<T> isA(Class<?> type); }
Is extends BaseMatcher<T> { public static <T> Matcher<T> isA(Class<?> type) { return is(IsInstanceOf.<T>instanceOf(type)); } Is(Matcher<T> matcher); @Override boolean matches(Object arg); @Override void describeTo(Description description); @Override void describeMismatch(Object item, Description mismatchDescription); static Matcher<T> is(Matcher<T> matcher); static Matcher<T> is(T value); static Matcher<T> isA(Class<?> type);  }