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 voidsetUp()Re-Initialize Torque and fill supplied data.voidtearDown()voidtestAddSelectColumns()voidtestAddSelectColumnsWithAsColumns()Checks that doSelect does add Select Columns if an AsColumn was already added.voidtestDeleteWithError()voidtestDeleteWithQualifiedTableName()voidtestDoInsertWithException()Check that Exception handling for doInsert works.voidtestDoInsertWithKeygen()Check that a doInsert with a key generator works.voidtestDoInsertWithoutKeygen()Check that a simple doInsert works.voidtestDoInsertWithSubselect()Check that a doInsert with subselects works.voidtestDoSelect()Check that a basic doSelect works.voidtestDoSelectAllFetchSize()Check that the fetch size gets set on the prepared statement when set in the criteria.voidtestDoSelectNoSelectColumnsPresent()Checks that doSelect ads the select columns if no select columns were already added.voidtestDoSelectWithQuery()Check that a doSelect with a query.voidtestDoUpdate()Check that a simple doUpdate works.voidtestDoUpdateWithPk()Check that a simple doUpdate works.voidtestExecuteStatementNamed()Check that executeStatements with a set of named replacements works.voidtestExecuteStatementNamedNoReplacements()Check that executeStatements with a set of named replacements works when the statement contains no replacements.
-
-
-
Method Detail
-
setUp
@BeforeEach public void setUp() throws ExceptionDescription copied from class:BaseTestCaseRe-Initialize Torque and fill supplied data. Subclasses which override setUp() must call super.setUp() as their first action.- Overrides:
setUpin classBaseTestCase- Throws:
Exception- if initialization fails.
-
tearDown
@AfterEach public void tearDown()
-
testDoSelect
@Test public void testDoSelect() throws ExceptionCheck that a basic doSelect works.- Throws:
Exception- if the test fails.
-
testDoSelectWithQuery
@Test public void testDoSelectWithQuery() throws ExceptionCheck that a doSelect with a query.- Throws:
Exception- if the test fails.
-
testAddSelectColumns
@Test public void testAddSelectColumns()
-
testDoSelectNoSelectColumnsPresent
@Test public void testDoSelectNoSelectColumnsPresent() throws ExceptionChecks 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 ExceptionChecks that doSelect does add Select Columns if an AsColumn was already added.- Throws:
Exception- if the test fails.
-
testDoSelectAllFetchSize
@Test public void testDoSelectAllFetchSize() throws ExceptionCheck 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
-
testDoInsertWithoutKeygen
@Test public void testDoInsertWithoutKeygen() throws ExceptionCheck that a simple doInsert works.- Throws:
Exception- if the test fails.
-
testDoInsertWithSubselect
@Test public void testDoInsertWithSubselect() throws ExceptionCheck that a doInsert with subselects works.- Throws:
Exception- if the test fails.
-
testDoInsertWithException
@Test public void testDoInsertWithException() throws ExceptionCheck that Exception handling for doInsert works.- Throws:
Exception- if the test fails.
-
testDoInsertWithKeygen
@Test public void testDoInsertWithKeygen() throws ExceptionCheck that a doInsert with a key generator works.- Throws:
Exception- if the test fails.
-
testDoUpdate
@Test public void testDoUpdate() throws ExceptionCheck that a simple doUpdate works.- Throws:
Exception- if the test fails.
-
testDoUpdateWithPk
@Test public void testDoUpdateWithPk() throws ExceptionCheck that a simple doUpdate works.- Throws:
Exception- if the test fails.
-
testExecuteStatementNamed
@Test public void testExecuteStatementNamed() throws ExceptionCheck that executeStatements with a set of named replacements works.- Throws:
Exception- if the test fails.
-
-