@Parameters public static Object[][] getParameters() { return new Function[][] { { t -> ((ThrowableTypeAssert<?>) t).as("test description") }, { t -> ((ThrowableTypeAssert<?>) t).describedAs("test description") }, { t -> ((ThrowableTypeAssert<?>) t).as(new TextDescription("%s description", "test")) }, { t -> ((ThrowableTypeAssert<?>) t).describedAs(new TextDescription("%s description", "test")) } }; }
public ThrowableTypeAssert_description_Test(Function<ThrowableTypeAssert<?>, ThrowableTypeAssert<?>> descriptionAdder) { this.descriptionAdder = descriptionAdder; }
/** * Delegate call to public static <T> org.assertj.core.api.ThrowableTypeAssert<T> org.assertj.core.api.Assertions.assertThatExceptionOfType(java.lang.Class<? extends T>) * {@link org.assertj.core.api.Assertions#assertThatExceptionOfType(java.lang.Class)} */ default <T extends Throwable> ThrowableTypeAssert<T> assertThatExceptionOfType(Class<? extends T> exceptionType) { return Assertions.assertThatExceptionOfType(exceptionType); }
/** * Delegate call to public static org.assertj.core.api.ThrowableTypeAssert<java.io.IOException> org.assertj.core.api.Assertions.assertThatIOException() * {@link org.assertj.core.api.Assertions#assertThatIOException()} */ default ThrowableTypeAssert<IOException> assertThatIOException() { return Assertions.assertThatIOException(); }
/** * Delegate call to public static org.assertj.core.api.ThrowableTypeAssert<java.lang.IllegalArgumentException> org.assertj.core.api.Assertions.assertThatIllegalArgumentException() * {@link org.assertj.core.api.Assertions#assertThatIllegalArgumentException()} */ default ThrowableTypeAssert<IllegalArgumentException> assertThatIllegalArgumentException() { return Assertions.assertThatIllegalArgumentException(); }
/** * Delegate call to public static org.assertj.core.api.ThrowableTypeAssert<java.lang.IllegalStateException> org.assertj.core.api.Assertions.assertThatIllegalStateException() * {@link org.assertj.core.api.Assertions#assertThatIllegalStateException()} */ default ThrowableTypeAssert<IllegalStateException> assertThatIllegalStateException() { return Assertions.assertThatIllegalStateException(); }
/** * Delegate call to public static org.assertj.core.api.ThrowableTypeAssert<java.lang.NullPointerException> org.assertj.core.api.Assertions.assertThatNullPointerException() * {@link org.assertj.core.api.Assertions#assertThatNullPointerException()} */ default ThrowableTypeAssert<NullPointerException> assertThatNullPointerException() { return Assertions.assertThatNullPointerException(); }
/** * Entry point to check that an exception of type T is thrown by a given {@code throwingCallable} * which allows to chain assertions on the thrown exception. * <p> * Example: * <pre><code class='java'> assertThatExceptionOfType(IOException.class).isThrownBy(() -> { throw new IOException("boom!"); }) * .withMessage("boom!"); </code></pre> * * This method is more or less the same of {@link #thenThrownBy(ThrowingCallable)} but in a more natural way. * @param actual the actual value. * @return the created {@link ThrowableTypeAssert}. */ default <T extends Throwable> ThrowableTypeAssert<T> thenExceptionOfType(Class<? extends T> exceptionType) { fluentBdd().verification.recordThen(this); return DELEGATE.assertThatExceptionOfType(exceptionType); }
/** * Entry point to check that an exception of type T is thrown by a given {@code throwingCallable} * which allows to chain assertions on the thrown exception. * <p> * Example: * <pre><code class='java'> assertThatExceptionOfType(IOException.class).isThrownBy(() -> { throw new IOException("boom!"); }) * .withMessage("boom!"); </code></pre> * * This method is more or less the same of {@link #andThrownBy(ThrowingCallable)} but in a more natural way. * @param actual the actual value. * @return the created {@link ThrowableTypeAssert}. */ default <T extends Throwable> ThrowableTypeAssert<T> andExceptionOfType(Class<? extends T> exceptionType) { fluentBdd().verification.recordThen(this); return DELEGATE.assertThatExceptionOfType(exceptionType); }