类 RunAfterTestClassCallbacks
- java.lang.Object
- org.junit.runners.model.Statement
- org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks
public class RunAfterTestClassCallbacks extends Statement
RunAfterTestClassCallbacks
is a custom JUnitStatement
which allows the Spring TestContext Framework to be plugged into the JUnit execution chain by callingafterTestClass()
on the suppliedTestContextManager
.NOTE: This class requires JUnit 4.9 or higher.
- 从以下版本开始:
- 3.0
- 作者:
- Sam Brannen
- 另请参阅:
evaluate()
,RunBeforeTestClassCallbacks
构造器概要
构造器 构造器 说明 RunAfterTestClassCallbacks(Statement next, TestContextManager testContextManager)
Construct a newRunAfterTestClassCallbacks
statement.
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 void
evaluate()
Evaluate the nextStatement
in the execution chain (typically an instance ofRunAfters
), catching any exceptions thrown, and then invokeTestContextManager.afterTestClass()
.
构造器详细资料
RunAfterTestClassCallbacks
public RunAfterTestClassCallbacks(Statement next, TestContextManager testContextManager)
Construct a newRunAfterTestClassCallbacks
statement.- 参数:
next
- the nextStatement
in the execution chaintestContextManager
- the TestContextManager upon which to callafterTestClass()
方法详细资料
evaluate
public void evaluate() throws Throwable
Evaluate the nextStatement
in the execution chain (typically an instance ofRunAfters
), catching any exceptions thrown, and then invokeTestContextManager.afterTestClass()
.If the invocation of
afterTestClass()
throws an exception, it will also be tracked. Multiple exceptions will be combined into aMultipleFailureException
.