public interface TestResourcesResolver
extends io.micronaut.core.order.Ordered
resolve(String, Map, Map)
method is called. This method is called with a property, corresponding
to a property which doesn't exist in the user configuration.
For example, if the "jdbc.driver" property is missing, a resolver
may declare that it can resolve that property.
As part of the process, it may start a test container for example.Modifier and Type | Field and Description |
---|---|
static java.lang.String |
TEST_RESOURCES_PROPERTY
The name of the top-level test resources property configuration key.
|
Modifier and Type | Method and Description |
---|---|
default java.util.List<java.lang.String> |
getRequiredProperties(java.lang.String expression)
Returns the list of properties which should be read
before resolving an expression: this can be used if the resolver
itself needs some configuration properties.
|
default java.util.List<java.lang.String> |
getRequiredPropertyEntries() |
java.util.List<java.lang.String> |
getResolvableProperties(java.util.Map<java.lang.String,java.util.Collection<java.lang.String>> propertyEntries,
java.util.Map<java.lang.String,java.lang.Object> testResourcesConfig)
Returns the list of properties that this resolver
is able to support.
|
java.util.Optional<java.lang.String> |
resolve(java.lang.String propertyName,
java.util.Map<java.lang.String,java.lang.Object> properties,
java.util.Map<java.lang.String,java.lang.Object> testResourcesConfiguration)
Resolves the given property.
|
static final java.lang.String TEST_RESOURCES_PROPERTY
java.util.List<java.lang.String> getResolvableProperties(java.util.Map<java.lang.String,java.util.Collection<java.lang.String>> propertyEntries, java.util.Map<java.lang.String,java.lang.Object> testResourcesConfig)
getRequiredPropertyEntries()
and
values are those property entries resolved.propertyEntries
- the property entriestestResourcesConfig
- the test resources configurationdefault java.util.List<java.lang.String> getRequiredProperties(java.lang.String expression)
expression
- the expression which needs to be resolved.default java.util.List<java.lang.String> getRequiredPropertyEntries()
java.util.Optional<java.lang.String> resolve(java.lang.String propertyName, java.util.Map<java.lang.String,java.lang.Object> properties, java.util.Map<java.lang.String,java.lang.Object> testResourcesConfiguration)
propertyName
- the property to resolveproperties
- the resolved required propertiestestResourcesConfiguration
- the test resources configuration