Package | Description |
---|---|
org.junit.jupiter.api |
JUnit Jupiter API for writing tests.
|
org.junit.jupiter.engine.descriptor |
Test descriptors used within the JUnit Jupiter test engine.
|
org.junit.jupiter.engine.execution |
Internal classes for test execution within the JUnit Jupiter test engine.
|
Modifier and Type | Method | Description |
---|---|---|
Executable |
DynamicTest.getExecutable() |
Get the
executable code block associated with this DynamicTest . |
Modifier and Type | Method | Description |
---|---|---|
static void |
Assertions.assertAll(java.lang.String heading,
Executable... executables) |
Asserts that all supplied
executables do not throw
exceptions. |
static void |
Assertions.assertAll(Executable... executables) |
Asserts that all supplied
executables do not throw
exceptions. |
static <T extends java.lang.Throwable> |
Assertions.assertThrows(java.lang.Class<T> expectedType,
Executable executable) |
Asserts that execution of the supplied
executable throws
an exception of the expectedType and returns the exception. |
static <T extends java.lang.Throwable> |
Assertions.assertThrows(java.lang.Class<T> expectedType,
Executable executable,
java.lang.String message) |
Asserts that execution of the supplied
executable throws
an exception of the expectedType and returns the exception. |
static <T extends java.lang.Throwable> |
Assertions.assertThrows(java.lang.Class<T> expectedType,
Executable executable,
java.util.function.Supplier<java.lang.String> messageSupplier) |
Asserts that execution of the supplied
executable throws
an exception of the expectedType and returns the exception. |
static void |
Assertions.assertTimeout(java.time.Duration timeout,
Executable executable) |
Asserts that execution of the supplied
executable
completes before the given timeout is exceeded. |
static void |
Assertions.assertTimeout(java.time.Duration timeout,
Executable executable,
java.lang.String message) |
Asserts that execution of the supplied
executable
completes before the given timeout is exceeded. |
static void |
Assertions.assertTimeout(java.time.Duration timeout,
Executable executable,
java.util.function.Supplier<java.lang.String> messageSupplier) |
Asserts that execution of the supplied
executable
completes before the given timeout is exceeded. |
static void |
Assertions.assertTimeoutPreemptively(java.time.Duration timeout,
Executable executable) |
Asserts that execution of the supplied
executable
completes before the given timeout is exceeded. |
static void |
Assertions.assertTimeoutPreemptively(java.time.Duration timeout,
Executable executable,
java.lang.String message) |
Asserts that execution of the supplied
executable
completes before the given timeout is exceeded. |
static void |
Assertions.assertTimeoutPreemptively(java.time.Duration timeout,
Executable executable,
java.util.function.Supplier<java.lang.String> messageSupplier) |
Asserts that execution of the supplied
executable
completes before the given timeout is exceeded. |
static void |
Assumptions.assumingThat(boolean assumption,
Executable executable) |
Execute the supplied
Executable , but only if the supplied
assumption is valid. |
static void |
Assumptions.assumingThat(java.util.function.BooleanSupplier assumptionSupplier,
Executable executable) |
Execute the supplied
Executable , but only if the supplied
assumption is valid. |
static DynamicTest |
DynamicTest.dynamicTest(java.lang.String displayName,
Executable executable) |
Factory for creating a new
DynamicTest for the supplied display
name and executable code block. |
Modifier and Type | Method | Description |
---|---|---|
static void |
Assertions.assertAll(java.lang.String heading,
java.util.Collection<Executable> executables) |
Asserts that all supplied
executables do not throw
exceptions. |
static void |
Assertions.assertAll(java.lang.String heading,
java.util.stream.Stream<Executable> executables) |
Asserts that all supplied
executables do not throw
exceptions. |
static void |
Assertions.assertAll(java.util.Collection<Executable> executables) |
Asserts that all supplied
executables do not throw
exceptions. |
static void |
Assertions.assertAll(java.util.stream.Stream<Executable> executables) |
Asserts that all supplied
executables do not throw
exceptions. |
Modifier and Type | Method | Description |
---|---|---|
protected void |
JupiterTestDescriptor.executeAndMaskThrowable(Executable executable) |
Execute the supplied
Executable and
mask any
exception thrown as an unchecked exception. |
Modifier and Type | Method | Description |
---|---|---|
void |
ThrowableCollector.execute(Executable executable) |
Execute the supplied
Executable and collect any Throwable
thrown during the execution. |