@Test public void testDescriptionFormatting() throws Exception { final StringDescription description = new StringDescription(); SUT.describeTo(description); assertThat( description.toString(), is("a future that completed with an exception that is an " + "instance of java.lang.RuntimeException") ); }
@Override public void describeTo(final Description description) { description .appendText("a future that completed with an exception that ") .appendDescriptionOf(matcher); }
ExceptionallyCompletedFuture extends TypeSafeDiagnosingMatcher<Future<T>> { @Override public void describeTo(final Description description) { description .appendText("a future that completed with an exception that ") .appendDescriptionOf(matcher); } }
ExceptionallyCompletedFuture extends TypeSafeDiagnosingMatcher<Future<T>> { @Override public void describeTo(final Description description) { description .appendText("a future that completed with an exception that ") .appendDescriptionOf(matcher); } ExceptionallyCompletedFuture(final Matcher<? extends Throwable> matcher); }
ExceptionallyCompletedFuture extends TypeSafeDiagnosingMatcher<Future<T>> { @Override public void describeTo(final Description description) { description .appendText("a future that completed with an exception that ") .appendDescriptionOf(matcher); } ExceptionallyCompletedFuture(final Matcher<? extends Throwable> matcher); @Override void describeTo(final Description description); }
ExceptionallyCompletedFuture extends TypeSafeDiagnosingMatcher<Future<T>> { @Override public void describeTo(final Description description) { description .appendText("a future that completed with an exception that ") .appendDescriptionOf(matcher); } ExceptionallyCompletedFuture(final Matcher<? extends Throwable> matcher); @Override void describeTo(final Description description);  }