public class DefaultTestResourcesClient extends java.lang.Object implements TestResourcesClient
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ACCESS_TOKEN |
CLIENT_READ_TIMEOUT, SERVER_URI
TEST_RESOURCES_PROPERTY
Constructor and Description |
---|
DefaultTestResourcesClient(io.micronaut.http.client.HttpClient client,
java.lang.String accessToken) |
Modifier and Type | Method and Description |
---|---|
void |
closeAll()
Closes all test resources.
|
void |
closeScope(java.lang.String id) |
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.
|
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 name,
java.util.Map<java.lang.String,java.lang.Object> properties,
java.util.Map<java.lang.String,java.lang.Object> testResourcesConfiguration)
Resolves the given property.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getResolvableProperties
public static final java.lang.String ACCESS_TOKEN
public DefaultTestResourcesClient(io.micronaut.http.client.HttpClient client, java.lang.String accessToken)
public 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)
TestResourcesResolver
TestResourcesResolver.getRequiredPropertyEntries()
and
values are those property entries resolved.getResolvableProperties
in interface TestResourcesClient
getResolvableProperties
in interface TestResourcesResolver
propertyEntries
- the property entriestestResourcesConfig
- the test resources configurationpublic java.util.Optional<java.lang.String> resolve(java.lang.String name, java.util.Map<java.lang.String,java.lang.Object> properties, java.util.Map<java.lang.String,java.lang.Object> testResourcesConfiguration)
TestResourcesResolver
resolve
in interface TestResourcesClient
resolve
in interface TestResourcesResolver
name
- the property to resolveproperties
- the resolved required propertiestestResourcesConfiguration
- the test resources configurationpublic java.util.List<java.lang.String> getRequiredProperties(java.lang.String expression)
TestResourcesResolver
getRequiredProperties
in interface TestResourcesClient
getRequiredProperties
in interface TestResourcesResolver
expression
- the expression which needs to be resolved.public java.util.List<java.lang.String> getRequiredPropertyEntries()
getRequiredPropertyEntries
in interface TestResourcesClient
getRequiredPropertyEntries
in interface TestResourcesResolver
public void closeAll()
TestResourcesClient
closeAll
in interface TestResourcesClient
public void closeScope(java.lang.String id)
closeScope
in interface TestResourcesClient