T
- the container typepublic abstract class AbstractR2DBCTestResourceProvider<T extends org.testcontainers.containers.GenericContainer<? extends T>> extends AbstractTestContainersProvider<T>
TEST_RESOURCES_PROPERTY
Constructor and Description |
---|
AbstractR2DBCTestResourceProvider() |
Modifier and Type | Method and Description |
---|---|
protected abstract java.util.Optional<io.r2dbc.spi.ConnectionFactoryOptions> |
extractOptions(org.testcontainers.containers.GenericContainer<?> container) |
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.
|
protected java.util.Optional<java.lang.String> |
resolveProperty(java.lang.String expression,
T container) |
protected java.util.Optional<java.lang.String> |
resolveWithoutContainer(java.lang.String propertyName,
java.util.Map<java.lang.String,java.lang.Object> properties,
java.util.Map<java.lang.String,java.lang.Object> testResourcesConfiguration)
Lets a resolver provide a value for the requested property without triggering the
creation of a test container.
|
protected boolean |
shouldAnswer(java.lang.String propertyName,
java.util.Map<java.lang.String,java.lang.Object> requestedProperties,
java.util.Map<java.lang.String,java.lang.Object> testResourcesConfiguration)
Determines if this resolver can resolve the requested property.
|
configureContainer, createContainer, getDefaultImageName, getOrder, getSimpleName, resolve, stringOrNull
public java.util.List<java.lang.String> getRequiredPropertyEntries()
public java.util.List<java.lang.String> getRequiredProperties(java.lang.String expression)
TestResourcesResolver
expression
- the expression which needs to be resolved.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.propertyEntries
- the property entriestestResourcesConfig
- the test resources configurationprotected boolean shouldAnswer(java.lang.String propertyName, java.util.Map<java.lang.String,java.lang.Object> requestedProperties, java.util.Map<java.lang.String,java.lang.Object> testResourcesConfiguration)
AbstractTestContainersProvider
shouldAnswer
in class AbstractTestContainersProvider<T extends org.testcontainers.containers.GenericContainer<? extends T>>
propertyName
- the property to resolverequestedProperties
- the resolved propertiestestResourcesConfiguration
- the test resources configurationprotected java.util.Optional<java.lang.String> resolveWithoutContainer(java.lang.String propertyName, java.util.Map<java.lang.String,java.lang.Object> properties, java.util.Map<java.lang.String,java.lang.Object> testResourcesConfiguration)
AbstractTestContainersProvider
resolveWithoutContainer
in class AbstractTestContainersProvider<T extends org.testcontainers.containers.GenericContainer<? extends T>>
propertyName
- the name of the property to resolveproperties
- the properties used to resolvetestResourcesConfiguration
- the test resources configurationprotected final java.util.Optional<java.lang.String> resolveProperty(java.lang.String expression, T container)
resolveProperty
in class AbstractTestContainersProvider<T extends org.testcontainers.containers.GenericContainer<? extends T>>
protected abstract java.util.Optional<io.r2dbc.spi.ConnectionFactoryOptions> extractOptions(org.testcontainers.containers.GenericContainer<?> container)