Class RunBeforeTestMethodCallbacks
- java.lang.Object
- org.junit.runners.model.Statement
- org.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks
public class RunBeforeTestMethodCallbacks extends Statement
RunBeforeTestMethodCallbacks
is a custom JUnitStatement
which allows the Spring TestContext Framework to be plugged into the JUnit execution chain by callingbeforeTestMethod()
on the suppliedTestContextManager
.- Since:
- 3.0
- Author:
- Sam Brannen
- See Also:
evaluate()
,RunAfterTestMethodCallbacks
Constructor Summary
Constructors Constructor Description RunBeforeTestMethodCallbacks(Statement next, Object testInstance, Method testMethod, TestContextManager testContextManager)
Construct a newRunBeforeTestMethodCallbacks
statement.
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
evaluate()
InvokeTestContextManager.beforeTestMethod(Object, Method)
and then evaluate the nextStatement
in the execution chain (typically an instance ofRunBefores
).
Constructor Detail
RunBeforeTestMethodCallbacks
public RunBeforeTestMethodCallbacks(Statement next, Object testInstance, Method testMethod, TestContextManager testContextManager)
Construct a newRunBeforeTestMethodCallbacks
statement.- Parameters:
next
- the nextStatement
in the execution chaintestInstance
- the current test instance (nevernull
)testMethod
- the test method which is about to be executed on the test instancetestContextManager
- the TestContextManager upon which to callbeforeTestMethod()