Class OracleTestPilotTestResourceProvider
java.lang.Object
io.micronaut.testresources.oracle.testpilot.OracleTestPilotTestResourceProvider
- All Implemented Interfaces:
io.micronaut.core.order.Ordered
,TestResourcesResolver
,ToggableTestResourcesResolver
public class OracleTestPilotTestResourceProvider
extends Object
implements ToggableTestResourcesResolver
A test resource provider which will integrate with Oracle Test Pilot for Third-Party Software.
- Since:
- 2.9.0
- Author:
- Loïc Lefèvre
-
Field Summary
FieldsFields inherited from interface io.micronaut.core.order.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
Fields inherited from interface io.micronaut.testresources.core.TestResourcesResolver
TEST_RESOURCES_PROPERTY
-
Constructor Summary
ConstructorsConstructorDescriptionOracleTestPilotTestResourceProvider
(Function<String, String> propertySupplier) -
Method Summary
Modifier and TypeMethodDescriptionprotected static String
datasourceExpressionOf
(String datasource, String property) protected static String
datasourceNameFrom
(String expression) protected static String
datasourcePropertyFrom
(String expression) final String
Returns a display name for a test resources resolver, used for debugging purposes.final String
getName()
getRequiredProperties
(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.getResolvableProperties
(Map<String, Collection<String>> propertyEntries, Map<String, Object> testResourcesConfig) Returns the list of properties that this resolver is able to support.protected static boolean
isDatasourceExpression
(String expression) Resolves the given property.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.micronaut.core.order.Ordered
getOrder
Methods inherited from interface io.micronaut.testresources.core.TestResourcesResolver
getId
Methods inherited from interface io.micronaut.testresources.core.ToggableTestResourcesResolver
isEnabled
-
Field Details
-
DISPLAY_NAME
- See Also:
-
PREFIX
- See Also:
-
-
Constructor Details
-
OracleTestPilotTestResourceProvider
public OracleTestPilotTestResourceProvider() -
OracleTestPilotTestResourceProvider
-
-
Method Details
-
getDisplayName
Description copied from interface:TestResourcesResolver
Returns a display name for a test resources resolver, used for debugging purposes.- Specified by:
getDisplayName
in interfaceTestResourcesResolver
- Specified by:
getDisplayName
in interfaceToggableTestResourcesResolver
- Returns:
- the display name
-
getName
- Specified by:
getName
in interfaceToggableTestResourcesResolver
-
getRequiredPropertyEntries
- Specified by:
getRequiredPropertyEntries
in interfaceTestResourcesResolver
-
isDatasourceExpression
-
datasourceNameFrom
-
datasourceExpressionOf
-
getRequiredProperties
Description copied from interface:TestResourcesResolver
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.- Specified by:
getRequiredProperties
in interfaceTestResourcesResolver
- Parameters:
expression
- the expression which needs to be resolved.- Returns:
- the list of configuration properties this resolver requires
-
getResolvableProperties
public final List<String> getResolvableProperties(Map<String, Collection<String>> propertyEntries, Map<String, Object> testResourcesConfig) Description copied from interface:TestResourcesResolver
Returns 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:
getResolvableProperties
in interfaceTestResourcesResolver
- Parameters:
propertyEntries
- the property entriestestResourcesConfig
- the test resources configuration- Returns:
- the list of properties
-
datasourcePropertyFrom
-
resolve
public final Optional<String> resolve(String propertyName, Map<String, Object> properties, Map<String, Object> testResourcesConfig) Description copied from interface:TestResourcesResolver
Resolves the given property.- Specified by:
resolve
in interfaceTestResourcesResolver
- Parameters:
propertyName
- the property to resolveproperties
- the resolved required propertiestestResourcesConfig
- the test resources configuration- Returns:
- the resolved property or empty if not found
-