Package org.junit.jupiter.api
Class AssertDoesNotThrow
- java.lang.Object
-
- org.junit.jupiter.api.AssertDoesNotThrow
-
class AssertDoesNotThrow extends java.lang.Object
AssertDoesNotThrow
is a collection of utility methods that support explicitly asserting that a given code block does not throw an exception.- Since:
- 5.2
-
-
Constructor Summary
Constructors Modifier Constructor Description private
AssertDoesNotThrow()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description (package private) static void
assertDoesNotThrow(Executable executable)
private static void
assertDoesNotThrow(Executable executable, java.lang.Object messageOrSupplier)
(package private) static void
assertDoesNotThrow(Executable executable, java.lang.String message)
(package private) static void
assertDoesNotThrow(Executable executable, java.util.function.Supplier<java.lang.String> messageSupplier)
(package private) static <T> T
assertDoesNotThrow(ThrowingSupplier<T> supplier)
private static <T> T
assertDoesNotThrow(ThrowingSupplier<T> supplier, java.lang.Object messageOrSupplier)
(package private) static <T> T
assertDoesNotThrow(ThrowingSupplier<T> supplier, java.lang.String message)
(package private) static <T> T
assertDoesNotThrow(ThrowingSupplier<T> supplier, java.util.function.Supplier<java.lang.String> messageSupplier)
private static java.lang.String
buildSuffix(java.lang.String message)
private static org.opentest4j.AssertionFailedError
createAssertionFailedError(java.lang.Object messageOrSupplier, java.lang.Throwable t)
-
-
-
Method Detail
-
assertDoesNotThrow
static void assertDoesNotThrow(Executable executable)
-
assertDoesNotThrow
static void assertDoesNotThrow(Executable executable, java.lang.String message)
-
assertDoesNotThrow
static void assertDoesNotThrow(Executable executable, java.util.function.Supplier<java.lang.String> messageSupplier)
-
assertDoesNotThrow
private static void assertDoesNotThrow(Executable executable, java.lang.Object messageOrSupplier)
-
assertDoesNotThrow
static <T> T assertDoesNotThrow(ThrowingSupplier<T> supplier)
-
assertDoesNotThrow
static <T> T assertDoesNotThrow(ThrowingSupplier<T> supplier, java.lang.String message)
-
assertDoesNotThrow
static <T> T assertDoesNotThrow(ThrowingSupplier<T> supplier, java.util.function.Supplier<java.lang.String> messageSupplier)
-
assertDoesNotThrow
private static <T> T assertDoesNotThrow(ThrowingSupplier<T> supplier, java.lang.Object messageOrSupplier)
-
createAssertionFailedError
private static org.opentest4j.AssertionFailedError createAssertionFailedError(java.lang.Object messageOrSupplier, java.lang.Throwable t)
-
buildSuffix
private static java.lang.String buildSuffix(java.lang.String message)
-
-