Package org.apache.torque.util
Class BasePeerImplTest
java.lang.Object
org.apache.torque.BaseTestCase
org.apache.torque.MockBaseTestCase
org.apache.torque.util.BasePeerImplTest
Tests the class BasePeerImpl.
- Version:
- $Id: BasePeerImplTest.java 1917245 2024-04-21 14:06:23Z tv $
-
Field Summary
Fields inherited from class org.apache.torque.MockBaseTestCase
closeableFields inherited from class org.apache.torque.BaseTestCase
CONFIG_FILE, database, databaseMap, databaseMysql, databaseOracle, databasePostgresql, integerColumnMap, stringColumnMap, stringColumnMap2, stringColumnMap3, tableMap -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidsetUp()Re-Initialize Torque and fill supplied data.voidtearDown()voidvoidChecks that doSelect does add Select Columns if an AsColumn was already added.voidvoidvoidCheck that Exception handling for doInsert works.voidCheck that a doInsert with a key generator works.voidCheck that a simple doInsert works.voidCheck that a doInsert with subselects works.voidCheck that a basic doSelect works.voidCheck that the fetch size gets set on the prepared statement when set in the criteria.voidChecks that doSelect ads the select columns if no select columns were already added.voidCheck that a doSelect with a query.voidCheck that a simple doUpdate works.voidCheck that a simple doUpdate works.voidCheck that executeStatements with a set of named replacements works.voidCheck that executeStatements with a set of named replacements works when the statement contains no replacements.
-
Constructor Details
-
BasePeerImplTest
public BasePeerImplTest()
-
-
Method Details
-
setUp
Description copied from class:MockBaseTestCaseRe-Initialize Torque and fill supplied data. Subclasses which override setUp() must call super.setUp() as their first action.- Overrides:
setUpin classMockBaseTestCase- Throws:
Exception- if initialization fails.
-
tearDown
@AfterEach public void tearDown() -
testDoSelect
Check that a basic doSelect works.- Throws:
Exception- if the test fails.
-
testDoSelectWithQuery
Check that a doSelect with a query.- Throws:
Exception- if the test fails.
-
testAddSelectColumns
@Test public void testAddSelectColumns() -
testDoSelectNoSelectColumnsPresent
Checks that doSelect ads the select columns if no select columns were already added.- Throws:
Exception- if the test fails.
-
testAddSelectColumnsWithAsColumns
Checks that doSelect does add Select Columns if an AsColumn was already added.- Throws:
Exception- if the test fails.
-
testDoSelectAllFetchSize
Check that the fetch size gets set on the prepared statement when set in the criteria.- Throws:
Exception- if the test fails.
-
testDeleteWithQualifiedTableName
- Throws:
Exception
-
testDeleteWithError
- Throws:
Exception
-
testDoInsertWithoutKeygen
Check that a simple doInsert works.- Throws:
Exception- if the test fails.
-
testDoInsertWithSubselect
Check that a doInsert with subselects works.- Throws:
Exception- if the test fails.
-
testDoInsertWithException
Check that Exception handling for doInsert works.- Throws:
Exception- if the test fails.
-
testDoInsertWithKeygen
Check that a doInsert with a key generator works.- Throws:
Exception- if the test fails.
-
testDoUpdate
Check that a simple doUpdate works.- Throws:
Exception- if the test fails.
-
testDoUpdateWithPk
Check that a simple doUpdate works.- Throws:
Exception- if the test fails.
-
testExecuteStatementNamed
Check that executeStatements with a set of named replacements works.- Throws:
Exception- if the test fails.
-
testExecuteStatementNamedNoReplacements
Check that executeStatements with a set of named replacements works when the statement contains no replacements.- Throws:
Exception- if the test fails.
-