Java 类org.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks 实例源码

项目:spring4-understanding    文件:SpringMethodRule.java   
/**
 * Wrap the supplied {@link Statement} with a {@code RunBeforeTestMethodCallbacks} statement.
 * @see RunBeforeTestMethodCallbacks
 */
private Statement withBeforeTestMethodCallbacks(Statement statement, FrameworkMethod frameworkMethod,
        Object testInstance, TestContextManager testContextManager) {

    return new RunBeforeTestMethodCallbacks(
            statement, testInstance, frameworkMethod.getMethod(), testContextManager);
}
项目:multi-user-test-runner    文件:SpringMultiUserTestClassRunner.java   
@Override
protected Statement withBefores(FrameworkMethod frameworkMethod, final Object testInstance, Statement statement) {
    Statement junitBefores = runnerDelegate.withBefores(
            getTestClass(),
            testInstance,
            statement
    );
    return new RunBeforeTestMethodCallbacks(
            junitBefores, testInstance, frameworkMethod.getMethod(), getTestContextManager()
    );
}
项目:spring4-understanding    文件:SpringJUnit4ClassRunner.java   
/**
 * Wrap the {@link Statement} returned by the parent implementation with a
 * {@code RunBeforeTestMethodCallbacks} statement, thus preserving the
 * default functionality while adding support for the Spring TestContext
 * Framework.
 * @see RunBeforeTestMethodCallbacks
 */
@Override
protected Statement withBefores(FrameworkMethod frameworkMethod, Object testInstance, Statement statement) {
    Statement junitBefores = super.withBefores(frameworkMethod, testInstance, statement);
    return new RunBeforeTestMethodCallbacks(junitBefores, testInstance, frameworkMethod.getMethod(),
            getTestContextManager());
}
项目:class-guard    文件:SpringJUnit4ClassRunner.java   
/**
 * Wraps the {@link Statement} returned by the parent implementation with a
 * {@link RunBeforeTestMethodCallbacks} statement, thus preserving the
 * default functionality but adding support for the Spring TestContext
 * Framework.
 * @see RunBeforeTestMethodCallbacks
 */
@Override
protected Statement withBefores(FrameworkMethod frameworkMethod, Object testInstance, Statement statement) {
    Statement junitBefores = super.withBefores(frameworkMethod, testInstance, statement);
    return new RunBeforeTestMethodCallbacks(junitBefores, testInstance, frameworkMethod.getMethod(),
        getTestContextManager());
}