Class AbstractJdbcTestCase

java.lang.Object
net.officefloor.jdbc.test.AbstractJdbcTestCase

public abstract class AbstractJdbcTestCase extends Object
Abstract tests for an JDBC vendor implementation.
Author:
Daniel Sagenschneider
  • Field Details

  • Constructor Details

    • AbstractJdbcTestCase

      public AbstractJdbcTestCase()
  • Method Details

    • getReadOnlyConnectionManagedObjectSourceClass

      protected abstract Class<? extends ReadOnlyConnectionManagedObjectSource> getReadOnlyConnectionManagedObjectSourceClass()
      Returns:
      ReadOnlyConnectionManagedObjectSource Class being tested.
    • getDataSourceManagedObjectSourceClass

      protected abstract Class<? extends DataSourceManagedObjectSource> getDataSourceManagedObjectSourceClass()
      Obtains the DataSourceManagedObjectSource Class being tested.
      Returns:
      DataSourceManagedObjectSource Class being tested.
    • loadConnectionProperties

      protected abstract void loadConnectionProperties(PropertyConfigurable mos)
      Loads the properties for the ReadOnlyConnectionManagedObjectSource.
      Parameters:
      mos - PropertyConfigurable.
    • loadDataSourceProperties

      protected abstract void loadDataSourceProperties(PropertyConfigurable mos)
      Loads the properties for the DataSourceManagedObjectSource.
      Parameters:
      mos - PropertyConfigurable.
    • cleanDatabase

      protected abstract void cleanDatabase(Connection connection) throws SQLException
      Cleans the database.
      Parameters:
      connection - Connection.
      Throws:
      SQLException - On failure to clean up the database.
    • setUp

      @BeforeEach protected void setUp() throws Exception
      Sets up the test.
      Throws:
      Exception - On test failure.
    • tearDown

      @AfterEach protected void tearDown() throws Exception
      Tears down the test.
      Throws:
      Exception - On test failure.
    • loadOptionalConnectionSpecification

      protected void loadOptionalConnectionSpecification(Properties properties)
      Enables adding additional Connection properties to specification.
      Parameters:
      properties - Properties to be loaded with additional specification.
    • loadOptionalDataSourceSpecification

      protected void loadOptionalDataSourceSpecification(Properties properties)
      Enables adding additional DataSource properties to specification.
      Parameters:
      properties - Properties to be loaded with additional specification.
    • testReadOnlyConnectionSpecification

      @Test public void testReadOnlyConnectionSpecification() throws Exception
      Ensure correct specification for read-only Connection.
      Throws:
      Exception - On test failure.
    • testDataSourceSpecification

      @Test public void testDataSourceSpecification() throws Exception
      Ensure correct specification for DataSource.
      Throws:
      Exception - On test failure.
    • testReadOnlyType

      @Test public void testReadOnlyType() throws Exception
      Ensure correct type for read-only Connection.
      Throws:
      Exception - On test failure.
    • testDataSourceType

      @Test public void testDataSourceType() throws Exception
      Ensure correct type for DataSource.
      Throws:
      Exception - On test failure.
    • testReadOnlyConnectivity

      @Test public void testReadOnlyConnectivity() throws Throwable
      Ensure read-only connectivity.
      Throws:
      Throwable - On test failure.
    • testDataSourceConnectivity

      @Test public void testDataSourceConnectivity() throws Throwable
      Ensure DataSource connectivity.
      Throws:
      Throwable - On test failure.
    • testReadOnlyConnectionManagement

      @Test public void testReadOnlyConnectionManagement() throws Throwable
      Ensure connection management for read-only Connection.
      Throws:
      Exception - On test failure.
      Throwable
    • testReadOnlyConnectionManagementViaProxy

      @Test public void testReadOnlyConnectionManagementViaProxy() throws Throwable
      Ensure connection management for read-only Connection.
      Throws:
      Exception - On test failure.
      Throwable
    • testDataSourceConnectionManagement

      @Test public void testDataSourceConnectionManagement() throws Throwable
      Ensure connection management for DataSource.
      Throws:
      Exception - On test failure.
      Throwable
    • testDataSourceConnectionManagementViaProxy

      @Test public void testDataSourceConnectionManagementViaProxy() throws Throwable
      Ensure connection management for DataSource.
      Throws:
      Exception - On test failure.
      Throwable
    • testReadOnlyValidateConnectivity

      @Test public void testReadOnlyValidateConnectivity() throws Exception
      Ensure correct type for read-only Connection.
      Throws:
      Exception - On test failure.
    • testDataSourceValidateConnectivity

      @Test public void testDataSourceValidateConnectivity() throws Exception
      Ensure correct type for DataSource.
      Throws:
      Exception - On test failure.
    • testInsertConnectionStressWithCompiler

      public void testInsertConnectionStressWithCompiler(org.junit.jupiter.api.TestInfo testInfo) throws Throwable
      Ensure can stress test against the database with compiled wrappers.
      Parameters:
      testInfo - TestInfo.
      Throws:
      Throwable - On test failure.
    • testInsertConnectionStressWithDynamicProxy

      public void testInsertConnectionStressWithDynamicProxy(org.junit.jupiter.api.TestInfo testInfo) throws Throwable
      Ensure can stress test against the database with Proxy.
      Parameters:
      testInfo - TestInfo.
      Throws:
      Throwable - On test failure.
    • testInsertConnectionTransactionStressWithCompiler

      public void testInsertConnectionTransactionStressWithCompiler(org.junit.jupiter.api.TestInfo testInfo) throws Throwable
      Ensure can stress test against the database with transactions with compiled wrappers.
      Parameters:
      testInfo - TestInfo.
      Throws:
      Throwable - On test failure.
    • testInsertConnectionTransactionStressWithDynamicProxy

      public void testInsertConnectionTransactionStressWithDynamicProxy(org.junit.jupiter.api.TestInfo testInfo) throws Throwable
      Ensure can stress test against the database with transactions.
      Parameters:
      testInfo - TestInfo.
      Throws:
      Throwable - On test failure.
    • testReadOnlySelectStressWithCompiler

      public void testReadOnlySelectStressWithCompiler(org.junit.jupiter.api.TestInfo testInfo) throws Throwable
      Undertakes select stress for read-only Connection with compiled wrappers.
      Parameters:
      testInfo - TestInfo.
      Throws:
      Throwable - On test failure.
    • testReadOnlySelectStressWithDynamicProxy

      public void testReadOnlySelectStressWithDynamicProxy(org.junit.jupiter.api.TestInfo testInfo) throws Throwable
      Undertakes select stress for read-only Connection with Proxy.
      Parameters:
      testInfo - TestInfo.
      Throws:
      Throwable - On test failure.
    • testDataSourceSelectStress

      public void testDataSourceSelectStress(org.junit.jupiter.api.TestInfo testInfo) throws Throwable
      Undertakes select stress for DataSource.
      Parameters:
      testInfo - TestInfo.
      Throws:
      Throwable - On test failure.
    • testDataSourceSelectStressWithDynamicProxy

      public void testDataSourceSelectStressWithDynamicProxy(org.junit.jupiter.api.TestInfo testInfo) throws Throwable
      Undertakes select stress for writable Connection with Proxy.
      Parameters:
      testInfo - TestInfo.
      Throws:
      Throwable - On test failure.