Annotation Type SpringIntegrationTest
@Target(TYPE)
@Retention(RUNTIME)
@Documented
@Inherited
public @interface SpringIntegrationTest
Annotation that can be specified on a test class that runs Spring Integration based tests.
Provides the following features over and above the regular Spring TestContext
Framework:
- Registers a
MockIntegrationContextbean with theMockIntegrationContext.MOCK_INTEGRATION_CONTEXT_BEAN_NAMEwhich can be used in tests for mocking and verifying integration flows. - Registers an
IntegrationEndpointsInitializerbean which is used to customizeAbstractEndpointbeans with provided options on this annotation.
The typical usage of this annotation is like:
@RunWith(SpringRunner.class)
@SpringIntegrationTest
public class MyIntegrationTests {
@Autowired
private MockIntegrationContext mockIntegrationContext;
}
- Since:
- 5.0
- See Also:
MockIntegrationContext
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description java.lang.String[]noAutoStartupSpecify a simple matching patterns ("xxx*", "*xxx", "*xxx*" or "xxx*yyy") forAbstractEndpointbean names to mark them asautoStartup = falseduring context initialization.
-
Element Details
-
noAutoStartup
java.lang.String[] noAutoStartupSpecify a simple matching patterns ("xxx*", "*xxx", "*xxx*" or "xxx*yyy") forAbstractEndpointbean names to mark them asautoStartup = falseduring context initialization.- Returns:
- the endpoints name patterns to stop during context initialization
- See Also:
IntegrationEndpointsInitializer,PatternMatchUtils
- Default:
- {}
-