public class SystemExitExtension
extends java.lang.Object
implements org.junit.jupiter.api.extension.BeforeEachCallback, org.junit.jupiter.api.extension.AfterEachCallback, org.junit.jupiter.api.extension.TestExecutionExceptionHandler
| Constructor and Description |
|---|
SystemExitExtension() |
| Modifier and Type | Method and 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,
java.lang.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,
java.lang.Throwable throwable)
throws java.lang.Throwable
handleTestExecutionException in interface org.junit.jupiter.api.extension.TestExecutionExceptionHandlercontext - the current extension context; never nullthrowable - the Throwable to handle; never nulljava.lang.Throwable - if the throwable argument is not a SystemExitPreventedException