Deprecated
for removal since 6.0.
Please use
org.
instead.
Extension provides native support for the
ExpectedException rule from JUnit 4.
By using this class-level extension on a test class,
ExpectedException can continue to be used.
However, you should rather switch to
org. for new code.
org.junit.jupiter.api.Assertions#assertThrows , org.junit.rules.ExpectedException , org.junit.rules.TestRule , org.junit.Rule
| Modifier and Type | Field and Description |
|---|---|
| private static final String | |
| private final TestRuleSupport |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | afterEach(ExtensionContext context)
Implements org. Callback that is invoked after an individual test and any user-defined teardown methods for that test have been executed. |
| private ExtensionContext. | |
| public void | handleTestExecutionException(ExtensionContext context, Throwable throwable)
Implements org. Handle the supplied |
| EXCEPTION_WAS_HANDLED | back to summary |
|---|---|
| private static final String EXCEPTION_WAS_HANDLED | |
| support | back to summary |
|---|---|
| private final TestRuleSupport support | |
| ExpectedExceptionSupport | back to summary |
|---|---|
| public ExpectedExceptionSupport() | |
| afterEach | back to summary |
|---|---|
| public void afterEach(ExtensionContext context) throws Exception Implements org. Doc from org. Callback that is invoked after an individual test and any user-defined teardown methods for that test have been executed.
| |
| getStore | back to summary |
|---|---|
| private ExtensionContext. | |
| handleTestExecutionException | back to summary |
|---|---|
| public void handleTestExecutionException(ExtensionContext context, Throwable throwable) throws Throwable Implements org. Doc from org. Handle the supplied Implementors must perform one of the following.
If the supplied Note that the
| |