Class RunPrepareTestInstanceCallbacks
- java.lang.Object
- org.junit.runners.model.Statement
- org.springframework.test.context.junit4.statements.RunPrepareTestInstanceCallbacks
public class RunPrepareTestInstanceCallbacks extends Statement
RunPrepareTestInstanceCallbacks
is a custom JUnitStatement
which 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 newRunPrepareTestInstanceCallbacks
statement.
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
evaluate()
InvokeTestContextManager.prepareTestInstance(Object)
and then evaluate the nextStatement
in the execution chain (typically an instance ofRunAfterTestMethodCallbacks
).
Constructor Detail
RunPrepareTestInstanceCallbacks
public RunPrepareTestInstanceCallbacks(Statement next, Object testInstance, TestContextManager testContextManager)
Construct a newRunPrepareTestInstanceCallbacks
statement.- Parameters:
next
- the nextStatement
in the execution chain; nevernull
testInstance
- the current test instance; nevernull
testContextManager
- theTestContextManager
upon which to callprepareTestInstance()
; nevernull
Method Detail
evaluate
public void evaluate() throws Throwable
InvokeTestContextManager.prepareTestInstance(Object)
and then evaluate the nextStatement
in the execution chain (typically an instance ofRunAfterTestMethodCallbacks
).