Annotation Interface ApplicationModuleTest
@Target(TYPE)
@Documented
@Inherited
@Retention(RUNTIME)
@SpringBootTest
@TypeExcludeFilters(ModuleTypeExcludeFilter.class)
@ImportAutoConfiguration(ModuleTestAutoConfiguration.class)
@ExtendWith({PublishedEventsParameterResolver.class,ScenarioParameterResolver.class})
@TestInstance(PER_CLASS)
@TestConstructor(autowireMode=ALL)
public @interface ApplicationModuleTest
Bootstraps the module containing the package of the test class annotated with
ApplicationModuleTest
. Will
apply the following modifications to the Spring Boot configuration:
- Restricts the component scanning to the module's package.
- Sets the module's package as the only auto-configuration and entity scan package.
- Author:
- Oliver Drotbohm
-
Nested Class Summary
-
Optional Element Summary
-
Element Details
-
value
- Default:
- STANDALONE
-
mode
- Default:
- STANDALONE
-
verifyAutomatically
boolean verifyAutomaticallyWhether to automatically verify the module structure for validity.- Returns:
- Default:
- true
-
extraIncludes
String[] extraIncludesModule names of modules to be included in the test run independent of what themode()
defines.- Returns:
- Default:
- {}
-
webEnvironment
@AliasFor(annotation=org.springframework.boot.test.context.SpringBootTest.class) SpringBootTest.WebEnvironment webEnvironmentThe type of web environment to create when applicable. Defaults toSpringBootTest.WebEnvironment.MOCK
.- Returns:
- the type of web environment
- Default:
- MOCK
-