Annotation Interface TestResourcesProperties
This annotation can be applied to tests annotated with @MicronautTest
in order to require some properties to be resolved by Micronaut Test Resources
before the application context is available.
It is conceptually similar to a
TestPropertyProvider
except that it allows accessing the test resources properties declaratively
instead of having to use the test resources client directly.-
Optional Element Summary
Modifier and TypeOptional ElementDescriptionClass<? extends TestResourcesPropertyProvider>[]
The optional list of test resource property providers which can be applied to enhance the set of properties available to a test.String[]
Declares the list of properties which should be made available to the test before the application context is started.
-
Element Details
-
value
String[] valueDeclares the list of properties which should be made available to the test before the application context is started. These properties will be queried by the test resources client and exposed as properties to the test.- Returns:
- the list of properties
- Default:
- {}
-
providers
Class<? extends TestResourcesPropertyProvider>[] providersThe optional list of test resource property providers which can be applied to enhance the set of properties available to a test.- Returns:
- the list of providers
- Default:
- {}
-