Class RunPrepareTestInstanceCallbacks
- java.lang.Object
- org.junit.runners.model.Statement
- org.springframework.test.context.junit4.statements.RunPrepareTestInstanceCallbacks
public class RunPrepareTestInstanceCallbacks extends Statement
RunPrepareTestInstanceCallbacksis a custom JUnitStatementwhich allows the Spring TestContext Framework to be plugged into the JUnit execution chain by callingprepareTestInstance()on the suppliedTestContextManager.- Since:
- 4.2
- Author:
- Sam Brannen
- See Also:
evaluate()
Constructor Summary
Constructors Constructor Description RunPrepareTestInstanceCallbacks(Statement next, Object testInstance, TestContextManager testContextManager)Construct a newRunPrepareTestInstanceCallbacksstatement.
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidevaluate()InvokeTestContextManager.prepareTestInstance(Object)and then evaluate the nextStatementin the execution chain (typically an instance ofRunAfterTestMethodCallbacks).
Constructor Detail
RunPrepareTestInstanceCallbacks
public RunPrepareTestInstanceCallbacks(Statement next, Object testInstance, TestContextManager testContextManager)
Construct a newRunPrepareTestInstanceCallbacksstatement.- Parameters:
next- the nextStatementin the execution chain; nevernulltestInstance- the current test instance; nevernulltestContextManager- theTestContextManagerupon which to callprepareTestInstance(); nevernull
Method Detail
evaluate
public void evaluate() throws Throwable
InvokeTestContextManager.prepareTestInstance(Object)and then evaluate the nextStatementin the execution chain (typically an instance ofRunAfterTestMethodCallbacks).