java.lang.Object
org.junit.jupiter.api.AssertThrowsExactly
AssertThrowsExactly
is a collection of utility methods that support asserting
an exception of an exact type is thrown.- Since:
- 5.8
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) static <T extends Throwable>
TassertThrowsExactly
(Class<T> expectedType, Executable executable) private static <T extends Throwable>
TassertThrowsExactly
(Class<T> expectedType, Executable executable, Object messageOrSupplier) (package private) static <T extends Throwable>
TassertThrowsExactly
(Class<T> expectedType, Executable executable, String message) (package private) static <T extends Throwable>
TassertThrowsExactly
(Class<T> expectedType, Executable executable, Supplier<String> messageSupplier)
-
Constructor Details
-
AssertThrowsExactly
private AssertThrowsExactly()
-
-
Method Details
-
assertThrowsExactly
-
assertThrowsExactly
static <T extends Throwable> T assertThrowsExactly(Class<T> expectedType, Executable executable, String message) -
assertThrowsExactly
static <T extends Throwable> T assertThrowsExactly(Class<T> expectedType, Executable executable, Supplier<String> messageSupplier) -
assertThrowsExactly
private static <T extends Throwable> T assertThrowsExactly(Class<T> expectedType, Executable executable, Object messageOrSupplier)
-