/** * Asserts that a value will eventually satisfy the specified {@link Matcher}. * <p> * Should the value be the result of a call to {@link DeferredHelper#invoking(Deferred)} * the result is unwrapped into a {@link Deferred} that is then used for the assert. * * @param <T> the type of value produced by the {@link Deferred} * * @param value the value * @param matcher the {@link Matcher} * * @throws AssertionError if the assertion fails */ public static <T> void assertThat(T value, Matcher<?> matcher) throws AssertionError { assertThat(null, eventually(value), matcher); }
/** * Asserts that a value will eventually satisfy the specified {@link Matcher}. * <p> * Should the value be the result of a call to {@link DeferredHelper#invoking(Deferred)} * the result is unwrapped into a {@link Deferred} that is then used for the assert. * * @param <T> the type of value produced by the {@link Deferred} * * @param message the message for the AssertionError (<code>null</code> ok) * @param value the value * @param matcher the {@link Matcher} * * @throws AssertionError if the assertion fails */ public static <T> void assertThat(String message, T value, Matcher<?> matcher) throws AssertionError { assertThat(message, eventually(value), matcher); }