@Retention(value=RUNTIME)
@Target(value={METHOD,ANNOTATION_TYPE,TYPE})
@ExtendWith(value=MicronautJunit5Extension.class)
@Factory
@Inherited
@Requires(condition=TestActiveCondition.class)
@Executable
public @interface MicronautTest
| Modifier and Type | Optional Element and Description |
|---|---|
java.lang.Class<?> |
application |
java.lang.Class<? extends io.micronaut.context.ApplicationContextBuilder>[] |
contextBuilder
The application context builder to use to construct the context.
|
java.lang.String[] |
environments |
java.lang.String[] |
packages |
java.lang.String[] |
propertySources
One or many references to classpath.
|
boolean |
rebuildContext
Whether to rebuild the application context before each test method.
|
boolean |
resolveParameters
By default, with JUnit 5 the test method parameters will be resolved to beans if possible.
|
boolean |
rollback
Whether to rollback (if possible) any data access code between each test execution.
|
boolean |
startApplication
Whether to start
EmbeddedApplication. |
boolean |
transactional
Allow disabling or enabling of automatic transaction wrapping.
|
TransactionMode |
transactionMode
The transaction mode describing how transactions should be handled for each test.
|
public abstract java.lang.Class<?> application
public abstract java.lang.String[] environments
public abstract java.lang.String[] packages
public abstract java.lang.String[] propertySources
public abstract boolean rollback
public abstract boolean transactional
public abstract boolean rebuildContext
public abstract java.lang.Class<? extends io.micronaut.context.ApplicationContextBuilder>[] contextBuilder
public abstract TransactionMode transactionMode
public abstract boolean startApplication
Whether to start EmbeddedApplication.
When false, only the application context will be started.
This can be used to disable EmbeddedServer.
EmbeddedApplication should be startedpublic abstract boolean resolveParameters
ParameterizedTest annotation.
Setting this member to false will completely disable bean resolution for method parameters.