Class RunPrepareTestInstanceCallbacks
java.lang.Object
org.junit.runners.model.Statement
org.springframework.test.context.junit4.statements.RunPrepareTestInstanceCallbacks
RunPrepareTestInstanceCallbacks
is a custom JUnit Statement
which
allows the Spring TestContext Framework to be plugged into the JUnit
execution chain by calling prepareTestInstance()
on the supplied TestContextManager
.- Since:
- 4.2
- Author:
- Sam Brannen
- See Also:
-
Constructor Summary
ConstructorDescriptionRunPrepareTestInstanceCallbacks
(Statement next, Object testInstance, TestContextManager testContextManager) Construct a newRunPrepareTestInstanceCallbacks
statement. -
Method Summary
Modifier and TypeMethodDescriptionvoid
evaluate()
InvokeTestContextManager.prepareTestInstance(Object)
and then evaluate the nextStatement
in the execution chain (typically an instance ofRunAfterTestMethodCallbacks
).
-
Constructor Details
-
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 Details
-
evaluate
InvokeTestContextManager.prepareTestInstance(Object)
and then evaluate the nextStatement
in the execution chain (typically an instance ofRunAfterTestMethodCallbacks
).
-