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

RunAfterTestClassCallbacks

open class RunAfterTestClassCallbacks : Statement

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

NOTE: This class requires JUnit 4.9 or higher.

Author
Sam Brannen

Since
3.0

See Also
#evaluate()RunBeforeTestClassCallbacks

Constructors

<init>

RunAfterTestClassCallbacks(next: Statement, testContextManager: TestContextManager)

Construct a new RunAfterTestClassCallbacks statement.

Functions

evaluate

open fun evaluate(): Unit

Evaluate the next Statement in the execution chain (typically an instance of org.junit.internal.runners.statements.RunAfters), catching any exceptions thrown, and then invoke TestContextManager#afterTestClass().

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