/** * 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); }
@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() ); }
/** * 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()); }
/** * 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()); }