Package org.apache.torque.util

## Class BasePeerImplTest

- java.lang.Object
- - org.apache.torque.BaseTestCase
  - - org.apache.torque.util.BasePeerImplTest

-     public class BasePeerImplTest
      extends BaseTestCase

  Tests the class BasePeerImpl.
  Version:
    $Id: BasePeerImplTest.java 1850726 2019-01-08 10:56:07Z gk $

- - ### Field Summary

    - ### Fields inherited from class org.apache.torque.BaseTestCase

      `CONFIG_FILE, database, databaseMap, databaseMysql, databaseOracle, databasePostgresql, integerColumnMap, stringColumnMap, stringColumnMap2, stringColumnMap3, tableMap`

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `BasePeerImplTest()` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `setUp()` | Re-Initialize Torque and fill supplied data.
    `void` | `tearDown()` |
    `void` | `testAddSelectColumns()` |
    `void` | `testAddSelectColumnsWithAsColumns()` | Checks that doSelect does add Select Columns if an AsColumn was already added.
    `void` | `testDeleteWithError()` |
    `void` | `testDeleteWithQualifiedTableName()` |
    `void` | `testDoInsertWithException()` | Check that Exception handling for doInsert works.
    `void` | `testDoInsertWithKeygen()` | Check that a doInsert with a key generator works.
    `void` | `testDoInsertWithoutKeygen()` | Check that a simple doInsert works.
    `void` | `testDoInsertWithSubselect()` | Check that a doInsert with subselects works.
    `void` | `testDoSelect()` | Check that a basic doSelect works.
    `void` | `testDoSelectAllFetchSize()` | Check that the fetch size gets set on the prepared statement when set in the criteria.
    `void` | `testDoSelectNoSelectColumnsPresent()` | Checks that doSelect ads the select columns if no select columns were already added.
    `void` | `testDoSelectWithQuery()` | Check that a doSelect with a query.
    `void` | `testDoUpdate()` | Check that a simple doUpdate works.
    `void` | `testDoUpdateWithPk()` | Check that a simple doUpdate works.
    `void` | `testExecuteStatementNamed()` | Check that executeStatements with a set of named replacements works.
    `void` | `testExecuteStatementNamedNoReplacements()` | Check that executeStatements with a set of named replacements works when the statement contains no replacements.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### BasePeerImplTest

          public BasePeerImplTest()

  - ### Method Detail

    - #### setUp

          @BeforeEach
          public void setUp()
                     throws Exception

      Description copied from class: `BaseTestCase`
      Re-Initialize Torque and fill supplied data. Subclasses which override setUp() must call super.setUp() as their first action.
      Overrides:
        `setUp` in class `BaseTestCase`
      Throws:
        `Exception` - if initialization fails.

    - #### tearDown

          @AfterEach
          public void tearDown()

    - #### testDoSelect

          @Test
          public void testDoSelect()
                            throws Exception

      Check that a basic doSelect works.
      Throws:
        `Exception` - if the test fails.

    - #### testDoSelectWithQuery

          @Test
          public void testDoSelectWithQuery()
                                     throws Exception

      Check that a doSelect with a query.
      Throws:
        `Exception` - if the test fails.

    - #### testAddSelectColumns

          @Test
          public void testAddSelectColumns()

    - #### testDoSelectNoSelectColumnsPresent

          @Test
          public void testDoSelectNoSelectColumnsPresent()
                                                  throws Exception

      Checks that doSelect ads the select columns if no select columns were already added.
      Throws:
        `Exception` - if the test fails.

    - #### testAddSelectColumnsWithAsColumns

          @Test
          public void testAddSelectColumnsWithAsColumns()
                                                 throws Exception

      Checks that doSelect does add Select Columns if an AsColumn was already added.
      Throws:
        `Exception` - if the test fails.

    - #### testDoSelectAllFetchSize

          @Test
          public void testDoSelectAllFetchSize()
                                        throws Exception

      Check that the fetch size gets set on the prepared statement when set in the criteria.
      Throws:
        `Exception` - if the test fails.

    - #### testDeleteWithQualifiedTableName

          @Test
          public void testDeleteWithQualifiedTableName()
                                                throws Exception

      Throws:
        `Exception`

    - #### testDeleteWithError

          @Test
          public void testDeleteWithError()
                                   throws Exception

      Throws:
        `Exception`

    - #### testDoInsertWithoutKeygen

          @Test
          public void testDoInsertWithoutKeygen()
                                         throws Exception

      Check that a simple doInsert works.
      Throws:
        `Exception` - if the test fails.

    - #### testDoInsertWithSubselect

          @Test
          public void testDoInsertWithSubselect()
                                         throws Exception

      Check that a doInsert with subselects works.
      Throws:
        `Exception` - if the test fails.

    - #### testDoInsertWithException

          @Test
          public void testDoInsertWithException()
                                         throws Exception

      Check that Exception handling for doInsert works.
      Throws:
        `Exception` - if the test fails.

    - #### testDoInsertWithKeygen

          @Test
          public void testDoInsertWithKeygen()
                                      throws Exception

      Check that a doInsert with a key generator works.
      Throws:
        `Exception` - if the test fails.

    - #### testDoUpdate

          @Test
          public void testDoUpdate()
                            throws Exception

      Check that a simple doUpdate works.
      Throws:
        `Exception` - if the test fails.

    - #### testDoUpdateWithPk

          @Test
          public void testDoUpdateWithPk()
                                  throws Exception

      Check that a simple doUpdate works.
      Throws:
        `Exception` - if the test fails.

    - #### testExecuteStatementNamed

          @Test
          public void testExecuteStatementNamed()
                                         throws Exception

      Check that executeStatements with a set of named replacements works.
      Throws:
        `Exception` - if the test fails.

    - #### testExecuteStatementNamedNoReplacements

          @Test
          public void testExecuteStatementNamedNoReplacements()
                                                       throws Exception

      Check that executeStatements with a set of named replacements works when the statement contains no replacements.
      Throws:
        `Exception` - if the test fails.