下面列出了怎么用org.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks的API类实例代码及写法,或者点击链接到github查看源代码。
/**
* Wrap the supplied {@link Statement} with a {@code RunBeforeTestMethodCallbacks} statement.
* @see RunBeforeTestMethodCallbacks
*/
private Statement withBeforeTestMethodCallbacks(Statement next, Method testMethod,
Object testInstance, TestContextManager testContextManager) {
return new RunBeforeTestMethodCallbacks(
next, testInstance, testMethod, testContextManager);
}
/**
* Wrap the supplied {@link Statement} with a {@code RunBeforeTestMethodCallbacks} statement.
* @see RunBeforeTestMethodCallbacks
*/
private Statement withBeforeTestMethodCallbacks(Statement next, Method testMethod,
Object testInstance, TestContextManager testContextManager) {
return new RunBeforeTestMethodCallbacks(
next, testInstance, testMethod, testContextManager);
}
/**
* 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);
}
/**
* 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());
}
/**
* 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());
}
/**
* 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());
}