Package org.junit.jupiter.api
Class AssertTimeout
- java.lang.Object
-
- org.junit.jupiter.api.AssertTimeout
-
class AssertTimeout extends java.lang.Object
AssertTimeout
is a collection of utility methods that support asserting the execution of the code under test did not take longer than the timeout duration.- Since:
- 5.0
-
-
Constructor Summary
Constructors Modifier Constructor Description private
AssertTimeout()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description (package private) static void
assertTimeout(java.time.Duration timeout, Executable executable)
(package private) static void
assertTimeout(java.time.Duration timeout, Executable executable, java.lang.String message)
(package private) static void
assertTimeout(java.time.Duration timeout, Executable executable, java.util.function.Supplier<java.lang.String> messageSupplier)
(package private) static <T> T
assertTimeout(java.time.Duration timeout, ThrowingSupplier<T> supplier)
private static <T> T
assertTimeout(java.time.Duration timeout, ThrowingSupplier<T> supplier, java.lang.Object messageOrSupplier)
(package private) static <T> T
assertTimeout(java.time.Duration timeout, ThrowingSupplier<T> supplier, java.lang.String message)
(package private) static <T> T
assertTimeout(java.time.Duration timeout, ThrowingSupplier<T> supplier, java.util.function.Supplier<java.lang.String> messageSupplier)
(package private) static void
assertTimeoutPreemptively(java.time.Duration timeout, Executable executable)
(package private) static void
assertTimeoutPreemptively(java.time.Duration timeout, Executable executable, java.lang.String message)
(package private) static void
assertTimeoutPreemptively(java.time.Duration timeout, Executable executable, java.util.function.Supplier<java.lang.String> messageSupplier)
(package private) static <T> T
assertTimeoutPreemptively(java.time.Duration timeout, ThrowingSupplier<T> supplier)
private static <T> T
assertTimeoutPreemptively(java.time.Duration timeout, ThrowingSupplier<T> supplier, java.lang.Object messageOrSupplier)
(package private) static <T> T
assertTimeoutPreemptively(java.time.Duration timeout, ThrowingSupplier<T> supplier, java.lang.String message)
(package private) static <T> T
assertTimeoutPreemptively(java.time.Duration timeout, ThrowingSupplier<T> supplier, java.util.function.Supplier<java.lang.String> messageSupplier)
-
-
-
Method Detail
-
assertTimeout
static void assertTimeout(java.time.Duration timeout, Executable executable)
-
assertTimeout
static void assertTimeout(java.time.Duration timeout, Executable executable, java.lang.String message)
-
assertTimeout
static void assertTimeout(java.time.Duration timeout, Executable executable, java.util.function.Supplier<java.lang.String> messageSupplier)
-
assertTimeout
static <T> T assertTimeout(java.time.Duration timeout, ThrowingSupplier<T> supplier)
-
assertTimeout
static <T> T assertTimeout(java.time.Duration timeout, ThrowingSupplier<T> supplier, java.lang.String message)
-
assertTimeout
static <T> T assertTimeout(java.time.Duration timeout, ThrowingSupplier<T> supplier, java.util.function.Supplier<java.lang.String> messageSupplier)
-
assertTimeout
private static <T> T assertTimeout(java.time.Duration timeout, ThrowingSupplier<T> supplier, java.lang.Object messageOrSupplier)
-
assertTimeoutPreemptively
static void assertTimeoutPreemptively(java.time.Duration timeout, Executable executable)
-
assertTimeoutPreemptively
static void assertTimeoutPreemptively(java.time.Duration timeout, Executable executable, java.lang.String message)
-
assertTimeoutPreemptively
static void assertTimeoutPreemptively(java.time.Duration timeout, Executable executable, java.util.function.Supplier<java.lang.String> messageSupplier)
-
assertTimeoutPreemptively
static <T> T assertTimeoutPreemptively(java.time.Duration timeout, ThrowingSupplier<T> supplier)
-
assertTimeoutPreemptively
static <T> T assertTimeoutPreemptively(java.time.Duration timeout, ThrowingSupplier<T> supplier, java.lang.String message)
-
assertTimeoutPreemptively
static <T> T assertTimeoutPreemptively(java.time.Duration timeout, ThrowingSupplier<T> supplier, java.util.function.Supplier<java.lang.String> messageSupplier)
-
assertTimeoutPreemptively
private static <T> T assertTimeoutPreemptively(java.time.Duration timeout, ThrowingSupplier<T> supplier, java.lang.Object messageOrSupplier)
-
-