Class R2DBCOracleFreeTestResourceProvider

java.lang.Object
io.micronaut.testresources.testcontainers.AbstractTestContainersProvider<T>
io.micronaut.testresources.r2dbc.core.AbstractR2DBCTestResourceProvider<org.testcontainers.oracle.OracleContainer>
io.micronaut.testresources.r2dbc.oracle.R2DBCOracleFreeTestResourceProvider
All Implemented Interfaces:
io.micronaut.core.order.Ordered, TestResourcesResolver, ToggableTestResourcesResolver

public class R2DBCOracleFreeTestResourceProvider extends AbstractR2DBCTestResourceProvider<org.testcontainers.oracle.OracleContainer>
A test resource provider which will spawn an Oracle Free reactive test container.
  • Field Details

  • Constructor Details

    • R2DBCOracleFreeTestResourceProvider

      public R2DBCOracleFreeTestResourceProvider()
  • Method Details

    • getRequiredProperties

      public List<String> getRequiredProperties(String expression)
      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 interface TestResourcesResolver
      Overrides:
      getRequiredProperties in class AbstractR2DBCTestResourceProvider<org.testcontainers.oracle.OracleContainer>
      Parameters:
      expression - the expression which needs to be resolved.
      Returns:
      the list of configuration properties this resolver requires
    • shouldAnswer

      protected boolean shouldAnswer(String propertyName, Map<String,Object> requestedProperties, Map<String,Object> testResourcesConfig)
      Description copied from class: AbstractTestContainersProvider
      Determines if this resolver can resolve the requested property. It is used in order to make sure that a "Postgres" resolver wouldn't provide a value if the requested container type is for MySQL, for example.
      Overrides:
      shouldAnswer in class AbstractR2DBCTestResourceProvider<org.testcontainers.oracle.OracleContainer>
      Parameters:
      propertyName - the property to resolve
      requestedProperties - the resolved properties
      testResourcesConfig - the test resources configuration
      Returns:
      if this resolver should answer
    • getDisplayName

      public String getDisplayName()
      Description copied from interface: TestResourcesResolver
      Returns a display name for a test resources resolver, used for debugging purposes.
      Returns:
      the display name
    • getSimpleName

      protected String getSimpleName()
      Description copied from class: AbstractTestContainersProvider
      Returns the name of the resource resolver, for example "kafka" or "mysql".
      Specified by:
      getSimpleName in class AbstractTestContainersProvider<org.testcontainers.oracle.OracleContainer>
      Returns:
      the name of the resolver
    • getDefaultImageName

      protected String getDefaultImageName()
      Description copied from class: AbstractTestContainersProvider
      Returns the default image name.
      Specified by:
      getDefaultImageName in class AbstractTestContainersProvider<org.testcontainers.oracle.OracleContainer>
      Returns:
      the default image name.
    • extractOptions

      protected Optional<io.r2dbc.spi.ConnectionFactoryOptions> extractOptions(org.testcontainers.containers.GenericContainer<?> container)
      Specified by:
      extractOptions in class AbstractR2DBCTestResourceProvider<org.testcontainers.oracle.OracleContainer>
    • createContainer

      protected org.testcontainers.oracle.OracleContainer createContainer(org.testcontainers.utility.DockerImageName imageName, Map<String,Object> requestedProperties, Map<String,Object> testResourcesConfig)
      Description copied from class: AbstractTestContainersProvider
      Creates the test container.
      Specified by:
      createContainer in class AbstractTestContainersProvider<org.testcontainers.oracle.OracleContainer>
      Parameters:
      imageName - the docker image name
      requestedProperties - the resolved properties
      testResourcesConfig - the test resources configuration
      Returns:
      a container