| Modifier and Type | Field and Description |
|---|---|
| private final TestInstance. | |
| private @Nullable TestInstances | |
| private final ThrowableCollector |
| Access | Constructor and Description |
|---|---|
| pack-priv | ClassExtensionContext(ExtensionContext parent, EngineExecutionListener engineExecutionListener, ClassBasedTestDescriptor testDescriptor, TestInstance.
|
| Modifier and Type | Method and Description |
|---|---|
| public Optional | getElement()
Implements org. Get the |
| public List | getEnclosingTestClasses()
Implements org. Get the enclosing test classes of the current test or container. |
| public Optional | getExecutionException()
Implements org. Get the exception that was thrown during execution of the test or container
associated with this |
| protected Node. | |
| public Optional | getTestClass()
Implements org. Get the |
| public Optional | getTestInstance()
Implements org. Get the test instance associated with the current test or container, if available. |
| public Optional | getTestInstanceLifecycle()
Implements org. Get the |
| public Optional | getTestInstances()
Implements org. Get the test instances associated with the current test or container, if available. |
| public Optional | getTestMethod()
Implements org. Get the |
| pack-priv void |
| lifecycle | back to summary |
|---|---|
| private final TestInstance. | |
| testInstances | back to summary |
|---|---|
| private @Nullable TestInstances testInstances | |
| throwableCollector | back to summary |
|---|---|
| private final ThrowableCollector throwableCollector | |
| ClassExtensionContext | back to summary |
|---|---|
| pack-priv ClassExtensionContext(ExtensionContext parent, EngineExecutionListener engineExecutionListener, ClassBasedTestDescriptor testDescriptor, TestInstance. | |
| getElement | back to summary |
|---|---|
| public Optional Implements org. Doc from org. Get the For example, if the current extension context encapsulates a test
class, test method, test factory method, or test template method, the
annotated element will be the corresponding Favor this method over more specific methods whenever the
| |
| getEnclosingTestClasses | back to summary |
|---|---|
| public List Implements org. Doc from org. Get the enclosing test classes of the current test or container. This method is useful to look up annotations on nested test classes and their enclosing runtime types:
| |
| getExecutionException | back to summary |
|---|---|
| public Optional Implements org. Doc from org. Get the exception that was thrown during execution of the test or container
associated with this This method is typically used for logging and tracing purposes. If you
wish to actually handle an exception thrown during test execution,
implement the Unlike the exception passed to a Note, however, that this method will never return an exception
swallowed by a
| |
| getPlatformExecutionMode | back to summary |
|---|---|
| protected Node. Implements abstract org.
| |
| getTestClass | back to summary |
|---|---|
| public Optional Implements org. Doc from org. Get the
| |
| getTestInstance | back to summary |
|---|---|
| public Optional Implements org. Doc from org. Get the test instance associated with the current test or container, if available.
| |
| getTestInstanceLifecycle | back to summary |
|---|---|
| public Optional Implements org. Doc from org. Get the
| |
| getTestInstances | back to summary |
|---|---|
| public Optional Implements org. Doc from org. Get the test instances associated with the current test or container, if available. While top-level tests only have a single test instance, nested tests have one additional instance for each enclosing test class.
| |
| getTestMethod | back to summary |
|---|---|
| public Optional Implements org. Doc from org. Get the
| |
| setTestInstances | back to summary |
|---|---|
| pack-priv void setTestInstances(TestInstances testInstances) | |