/** * Fails with a message explaining that a {@link Throwable} of given class was expected to be thrown * but had not been. * * @param throwableClass the Throwable class that was expected to be thrown. * @throws AssertionError with a message explaining that a {@link Throwable} of given class was expected to be thrown but had * not been. * @since 2.6.0 / 3.6.0 * * {@link Fail#shouldHaveThrown(Class)} can be used as a replacement. */ public void failBecauseExceptionWasNotThrown(Class<? extends Throwable> throwableClass) { shouldHaveThrown(throwableClass); }
/** * Fails with a message explaining that a {@link Throwable} of given class was expected to be thrown * but had not been. * * @param throwableClass the Throwable class that was expected to be thrown. * @throws AssertionError with a message explaining that a {@link Throwable} of given class was expected to be thrown but had * not been. * @since 2.6.0 / 3.6.0 * * {@link Fail#shouldHaveThrown(Class)} can be used as a replacement. */ public void failBecauseExceptionWasNotThrown(Class<? extends Throwable> throwableClass) { shouldHaveThrown(throwableClass); }