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