Class InternalTestResourcesServiceResolver
java.lang.Object
io.micronaut.testresources.server.InternalTestResourcesServiceResolver
- All Implemented Interfaces:
io.micronaut.core.order.Ordered,TestResourcesResolver,InjectableTestResourcesResolver
@Internal
@Singleton
public class InternalTestResourcesServiceResolver
extends Object
implements InjectableTestResourcesResolver
A
TestResourcesResolver that resolves properties regarding the Test Resource Service itself,
such as micronaut.test.resources.server.uri.- Since:
- 2.4.0
- Author:
- Álvaro Sánchez-Mariscal
-
Field Summary
FieldsFields inherited from interface io.micronaut.core.order.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCEFields inherited from interface io.micronaut.testresources.core.TestResourcesResolver
TEST_RESOURCES_PROPERTY -
Constructor Summary
ConstructorsConstructorDescriptionInternalTestResourcesServiceResolver(io.micronaut.runtime.server.EmbeddedServer server) -
Method Summary
Modifier and TypeMethodDescriptiongetResolvableProperties(Map<String, Collection<String>> propertyEntries, Map<String, Object> testResourcesConfig) Returns the list of properties that this resolver is able to support.Resolves the given property.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.micronaut.core.order.Ordered
getOrderMethods inherited from interface io.micronaut.testresources.core.TestResourcesResolver
getDisplayName, getId, getRequiredProperties, getRequiredPropertyEntries
-
Field Details
-
SERVER_URI
- See Also:
-
-
Constructor Details
-
InternalTestResourcesServiceResolver
public InternalTestResourcesServiceResolver(io.micronaut.runtime.server.EmbeddedServer server)
-
-
Method Details
-
getResolvableProperties
public List<String> getResolvableProperties(Map<String, Collection<String>> propertyEntries, Map<String, Object> testResourcesConfig) Description copied from interface:TestResourcesResolverReturns the list of properties that this resolver is able to support. The property entries map is a map which keys are the property entries retrieved from callingTestResourcesResolver.getRequiredPropertyEntries()and values are those property entries resolved.- Specified by:
getResolvablePropertiesin interfaceTestResourcesResolver- Parameters:
propertyEntries- the property entriestestResourcesConfig- the test resources configuration- Returns:
- the list of properties
-
resolve
public Optional<String> resolve(String propertyName, Map<String, Object> properties, Map<String, Object> testResourcesConfig) Description copied from interface:TestResourcesResolverResolves the given property.- Specified by:
resolvein interfaceTestResourcesResolver- Parameters:
propertyName- the property to resolveproperties- the resolved required propertiestestResourcesConfig- the test resources configuration- Returns:
- the resolved property or empty if not found
-