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

The following examples show how to use org.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks. 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 RunAfterTestMethodCallbacks} statement.
 * @see RunAfterTestMethodCallbacks
 */
private Statement withAfterTestMethodCallbacks(Statement next, Method testMethod,
		Object testInstance, TestContextManager testContextManager) {

	return new RunAfterTestMethodCallbacks(
			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 RunAfterTestMethodCallbacks} statement.
 * @see RunAfterTestMethodCallbacks
 */
private Statement withAfterTestMethodCallbacks(Statement next, Method testMethod,
		Object testInstance, TestContextManager testContextManager) {

	return new RunAfterTestMethodCallbacks(
			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 RunAfterTestMethodCallbacks} statement.
 * @see RunAfterTestMethodCallbacks
 */
private Statement withAfterTestMethodCallbacks(Statement statement, FrameworkMethod frameworkMethod,
		Object testInstance, TestContextManager testContextManager) {

	return new RunAfterTestMethodCallbacks(
			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 RunAfterTestMethodCallbacks} statement, thus preserving the
 * default functionality while adding support for the Spring TestContext
 * Framework.
 * @see RunAfterTestMethodCallbacks
 */
@Override
protected Statement withAfters(FrameworkMethod frameworkMethod, Object testInstance, Statement statement) {
	Statement junitAfters = super.withAfters(frameworkMethod, testInstance, statement);
	return new RunAfterTestMethodCallbacks(junitAfters, 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 RunAfterTestMethodCallbacks} statement, thus preserving the
 * default functionality while adding support for the Spring TestContext
 * Framework.
 * @see RunAfterTestMethodCallbacks
 */
@Override
protected Statement withAfters(FrameworkMethod frameworkMethod, Object testInstance, Statement statement) {
	Statement junitAfters = super.withAfters(frameworkMethod, testInstance, statement);
	return new RunAfterTestMethodCallbacks(junitAfters, 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 RunAfterTestMethodCallbacks} statement, thus preserving the
 * default functionality while adding support for the Spring TestContext
 * Framework.
 * @see RunAfterTestMethodCallbacks
 */
@Override
protected Statement withAfters(FrameworkMethod frameworkMethod, Object testInstance, Statement statement) {
	Statement junitAfters = super.withAfters(frameworkMethod, testInstance, statement);
	return new RunAfterTestMethodCallbacks(junitAfters, testInstance, frameworkMethod.getMethod(), getTestContextManager());
}