@Test public void describesActualClassInMismatchMessage() { assertMismatchDescription("\"some text\" is a java.lang.String", instanceOf(Number.class), "some text"); }
@SuppressWarnings("unchecked") public static <T> Matcher<T> instanceOf(Class<?> type) { return (Matcher<T>) new IsInstanceOf(type); }
IsInstanceOf extends DiagnosingMatcher<Object> { @SuppressWarnings("unchecked") public static <T> Matcher<T> instanceOf(Class<?> type) { return (Matcher<T>) new IsInstanceOf(type); } }
IsInstanceOf extends DiagnosingMatcher<Object> { @SuppressWarnings("unchecked") public static <T> Matcher<T> instanceOf(Class<?> type) { return (Matcher<T>) new IsInstanceOf(type); } IsInstanceOf(Class<?> expectedClass); }
IsInstanceOf extends DiagnosingMatcher<Object> { @SuppressWarnings("unchecked") public static <T> Matcher<T> instanceOf(Class<?> type) { return (Matcher<T>) new IsInstanceOf(type); } IsInstanceOf(Class<?> expectedClass); @Override void describeTo(Description description); @SuppressWarnings("unchecked") static Matcher<T> instanceOf(Class<?> type); @SuppressWarnings("unchecked") static Matcher<T> any(Class<T> type); }
IsInstanceOf extends DiagnosingMatcher<Object> { @SuppressWarnings("unchecked") public static <T> Matcher<T> instanceOf(Class<?> type) { return (Matcher<T>) new IsInstanceOf(type); } IsInstanceOf(Class<?> expectedClass); @Override void describeTo(Description description); @SuppressWarnings("unchecked") static Matcher<T> instanceOf(Class<?> type); @SuppressWarnings("unchecked") static Matcher<T> any(Class<T> type);  }