Class RunBeforeTestMethodCallbacks
- java.lang.Object
- org.junit.runners.model.Statement
- org.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks
public class RunBeforeTestMethodCallbacks extends Statement
RunBeforeTestMethodCallbacksis a custom JUnitStatementwhich 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 newRunBeforeTestMethodCallbacksstatement.
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidevaluate()InvokeTestContextManager.beforeTestMethod(Object, Method)and then evaluate the nextStatementin the execution chain (typically an instance ofRunBefores).
Constructor Detail
RunBeforeTestMethodCallbacks
public RunBeforeTestMethodCallbacks(Statement next, Object testInstance, Method testMethod, TestContextManager testContextManager)
Construct a newRunBeforeTestMethodCallbacksstatement.- Parameters:
next- the nextStatementin 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()