public class SpringIntegrationMethodRule
extends java.lang.Object
implements org.junit.rules.MethodRule
TestRule to be used with @Rule to run the @Before and @After modifiers that are part of SpringJUnit4ClassRunner.| Constructor and Description |
|---|
SpringIntegrationMethodRule() |
| Modifier and Type | Method and Description |
|---|---|
org.junit.runners.model.Statement |
apply(org.junit.runners.model.Statement base,
org.junit.runners.model.FrameworkMethod frameworkMethod,
java.lang.Object target)
Wraps
RunBeforeTestMethodCallbacks and RunAfterTestMethodCallbacks around the provided statement. |
static org.springframework.test.context.TestContextManager |
createTestContextManager(java.lang.Class<?> testClass)
Creates a test context manager.
|
org.springframework.test.context.TestContextManager |
getTestContextManager(java.lang.Class<?> testClass)
Gets the test context manager, creating it if it doesn't exist.
|
public org.junit.runners.model.Statement apply(org.junit.runners.model.Statement base,
org.junit.runners.model.FrameworkMethod frameworkMethod,
java.lang.Object target)
RunBeforeTestMethodCallbacks and RunAfterTestMethodCallbacks around the provided statement.apply in interface org.junit.rules.MethodRulebase - The base statementframeworkMethod - Information about the test method being run.target - The instance of the test class being run.public static org.springframework.test.context.TestContextManager createTestContextManager(java.lang.Class<?> testClass)
testClass - The test class to create the test context manager for.public org.springframework.test.context.TestContextManager getTestContextManager(java.lang.Class<?> testClass)
testClass - The test class to create the test context manager for, if it doesn't exist.