spring-framework / org.springframework.test.context.junit4.statements / RunAfterTestExecutionCallbacks

RunAfterTestExecutionCallbacks

open class RunAfterTestExecutionCallbacks : Statement

RunAfterTestExecutionCallbacks is a custom JUnit Statement which allows the Spring TestContext Framework to be plugged into the JUnit 4 execution chain by calling afterTestExecution() on the supplied TestContextManager.

NOTE: This class requires JUnit 4.9 or higher.

Author
Sam Brannen

Since
5.0

See Also
#evaluate()RunBeforeTestExecutionCallbacks

Constructors

<init>

RunAfterTestExecutionCallbacks(next: Statement, testInstance: Any, testMethod: Method, testContextManager: TestContextManager)

Construct a new RunAfterTestExecutionCallbacks statement.

Functions

evaluate

open fun evaluate(): Unit

Evaluate the next Statement in the execution chain (typically an instance of RunBeforeTestExecutionCallbacks), catching any exceptions thrown, and then invoke TestContextManager#afterTestExecution supplying the first caught exception (if any).

If the invocation of afterTestExecution() throws an exception, that exception will also be tracked. Multiple exceptions will be combined into a MultipleFailureException.