org.junit.jupiter.api.extension.AfterEachCallback, org.junit.jupiter.api.extension.BeforeEachCallback, org.junit.jupiter.api.extension.Extension, org.junit.jupiter.api.extension.TestExecutionExceptionHandlerpublic class SystemExitExtension extends Object implements org.junit.jupiter.api.extension.BeforeEachCallback, org.junit.jupiter.api.extension.AfterEachCallback, org.junit.jupiter.api.extension.TestExecutionExceptionHandler
| Constructor | Description |
|---|---|
SystemExitExtension() |
| Modifier and Type | Method | Description |
|---|---|---|
void |
afterEach(org.junit.jupiter.api.extension.ExtensionContext context) |
|
void |
beforeEach(org.junit.jupiter.api.extension.ExtensionContext context) |
|
void |
handleTestExecutionException(org.junit.jupiter.api.extension.ExtensionContext context,
Throwable throwable) |
This is here so we can catch exceptions thrown by our own security manager and prevent them from
stopping the annotated test.
|
public void afterEach(org.junit.jupiter.api.extension.ExtensionContext context)
afterEach in interface org.junit.jupiter.api.extension.AfterEachCallbackpublic void beforeEach(org.junit.jupiter.api.extension.ExtensionContext context)
beforeEach in interface org.junit.jupiter.api.extension.BeforeEachCallbackpublic void handleTestExecutionException(org.junit.jupiter.api.extension.ExtensionContext context,
Throwable throwable)
throws Throwable
handleTestExecutionException in interface org.junit.jupiter.api.extension.TestExecutionExceptionHandlercontext - the current extension context; never nullthrowable - the Throwable to handle; never nullThrowable - if the throwable argument is not a SystemExitPreventedException