Annotation Type MicronautTest
-
@Retention(RUNTIME) @Target({METHOD,ANNOTATION_TYPE,TYPE}) @Factory @Inherited @Requires(condition=io.micronaut.test.condition.TestActiveCondition.class) public @interface MicronautTestAnnotation that can be applied to any Spock spec or JUnit 5 test to make it a Micronaut test.- Since:
- 2.1.0
-
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description java.lang.Class<?>applicationjava.lang.Class<? extends io.micronaut.context.ApplicationContextBuilder>[]contextBuilderThe application context builder to use to construct the context.java.lang.String[]environmentsjava.lang.String[]packagesjava.lang.String[]propertySourcesOne or many references to classpath.booleanrebuildContextWhether to rebuild the application context before each test method.booleanrollbackWhether to rollback (if possible) any data access code between each test execution.booleanstartApplicationWhether to startEmbeddedApplication.booleantransactionalAllow disabling or enabling of automatic transaction wrapping.io.micronaut.test.annotation.TransactionModetransactionModeThe transaction mode describing how transactions should be handled for each test.
-