org.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks Java Examples

The following examples show how to use org.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: SpringMethodRule.java    From spring-analysis-note with MIT License 5 votes vote down vote up
/**
 * 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);
}
 
Example #2
Source File: SpringMethodRule.java    From java-technology-stack with MIT License 5 votes vote down vote up
/**
 * 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);
}
 
Example #3
Source File: SpringMethodRule.java    From spring4-understanding with Apache License 2.0 5 votes vote down vote up
/**
 * 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);
}
 
Example #4
Source File: SpringJUnit4ClassRunner.java    From spring4-understanding with Apache License 2.0 3 votes vote down vote up
/**
 * 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());
}
 
Example #5
Source File: SpringJUnit4ClassRunner.java    From spring-analysis-note with MIT License 2 votes vote down vote up
/**
 * 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());
}
 
Example #6
Source File: SpringJUnit4ClassRunner.java    From java-technology-stack with MIT License 2 votes vote down vote up
/**
 * 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());
}