Package org.apache.torque.criteria
Klasse CriteriaTest
java.lang.Object
org.apache.torque.BaseTestCase
org.apache.torque.criteria.CriteriaTest
Test class for Criteria.
- Version:
- $Id: CriteriaTest.java 1917567 2024-05-08 09:16:31Z gk $
- Autor:
- Christopher Elkins, Sam Joseph, Scott Eade
-
Feldübersicht
Von Klasse geerbte Felder org.apache.torque.BaseTestCase
CONFIG_FILE, database, databaseMap, databaseMysql, databaseOracle, databasePostgresql, integerColumnMap, stringColumnMap, stringColumnMap2, stringColumnMap3, tableMap
-
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungvoid
setUp()
Initializes the criteria.void
void
void
Testcase for andDate().void
Test where condition with several ANDs compairing against Strings.void
Tests <= and =>.void
Test that true is evaluated correctly in Mysql.void
Test that true is evaluated correctly in Postgresql.void
Test that cloning works.void
Tests that a criterion is copied when being added as top level criterion using where (also tests and).void
Tests that a criterion is copied when being added as top level criterion using where (also tests and).void
void
Tests that a criterion is copied when being added as top level criterion using where (also tests and).void
Tests that a criterion is copied when being added as top level criterion using where (also tests and).void
void
TORQUE-87void
void
Tests that a criterion does not get changed if it is added as root criterion to a criteria which is afterwards changed.void
Tests that a criterion does not get changed if it is added as root criterion to a criteria which is afterwards changed.void
Test Criterion.setIgnoreCase().void
testcase for where(Date)void
void
Test thatCriteria.equals(Object)
works correctly for a simple Criteria object.void
void
This test case verifies if the Criteria.LIKE comparison type will get replaced through Criteria.EQUAL if there are no SQL wildcards in the given value.void
Test that nesting Criterions works for equals comparison.void
Test that nesting Criterions works for other comparisons than equal.void
This test case verifies if the Criteria.NOT_LIKE comparison type will get replaced through Criteria.NOT_EQUAL if there are no SQL wildcards in the given value.void
Checks whether orderBy works.void
Tests that unary operators as rValue are interpreted as comparison operator in the two-arg or method.void
Test that serialization works.void
Testcase for whereDate()void
Test basic where condition on a string with a non-equal.void
Test basic where condition on a string.void
Test basic where condition on a string.void
Tests that unary operators as rValue are interpreted as comparison operator in the two-arg where method.
-
Konstruktordetails
-
CriteriaTest
public CriteriaTest()
-
-
Methodendetails
-
setUp
Initializes the criteria.- Setzt außer Kraft:
setUp
in KlasseBaseTestCase
- Löst aus:
Exception
- if initialization fails.
-
testWhereString
@Test public void testWhereString()Test basic where condition on a string. -
testWhereStringReversed
@Test public void testWhereStringReversed()Test basic where condition on a string. The condition is reversed, i.e the String preceeds the column. -
testWhereNotEqual
@Test public void testWhereNotEqual()Test basic where condition on a string with a non-equal. comparison operator. -
testWhereUnaryOperator
@Test public void testWhereUnaryOperator()Tests that unary operators as rValue are interpreted as comparison operator in the two-arg where method. -
testIsNullOperator
@Test public void testIsNullOperator() -
testOrUnaryOperator
@Test public void testOrUnaryOperator()Tests that unary operators as rValue are interpreted as comparison operator in the two-arg or method. -
testAndString
@Test public void testAndString()Test where condition with several ANDs compairing against Strings. -
testCriteriaTopLevelCriterionGetsCopiedWhere
@Test public void testCriteriaTopLevelCriterionGetsCopiedWhere()Tests that a criterion is copied when being added as top level criterion using where (also tests and). checks TORQUE-243. -
testCriteriaTopLevelCriterionGetsCopiedOr
@Test public void testCriteriaTopLevelCriterionGetsCopiedOr()Tests that a criterion is copied when being added as top level criterion using where (also tests and). checks TORQUE-243. -
testCriteriaCriterionGetsCopiedWhere
@Test public void testCriteriaCriterionGetsCopiedWhere()Tests that a criterion is copied when being added as top level criterion using where (also tests and). checks TORQUE-243. -
testCriteriaCriterionGetsCopiedOr
@Test public void testCriteriaCriterionGetsCopiedOr()Tests that a criterion is copied when being added as top level criterion using where (also tests and). checks TORQUE-243. -
testCriterionDoesNotGetChangedByCriteriaOr
@Test public void testCriterionDoesNotGetChangedByCriteriaOr()Tests that a criterion does not get changed if it is added as root criterion to a criteria which is afterwards changed. checks TORQUE-243. -
testCriterionDoesNotGetChangedByCriteriaAnd
@Test public void testCriterionDoesNotGetChangedByCriteriaAnd()Tests that a criterion does not get changed if it is added as root criterion to a criteria which is afterwards changed. checks TORQUE-243. -
testNestedCriterionComparisonEqual
@Test public void testNestedCriterionComparisonEqual() throws org.apache.torque.TorqueExceptionTest that nesting Criterions works for equals comparison.- Löst aus:
org.apache.torque.TorqueException
-
testNestedCriterionComparisonLessGreaterThan
@Test public void testNestedCriterionComparisonLessGreaterThan() throws org.apache.torque.TorqueExceptionTest that nesting Criterions works for other comparisons than equal.- Löst aus:
org.apache.torque.TorqueException
- if fails
-
testBetweenCriterion
@Test public void testBetweenCriterion() throws org.apache.torque.TorqueExceptionTests <= and =>.- Löst aus:
org.apache.torque.TorqueException
- if fail
-
testCriterionIgnoreCase
@Test public void testCriterionIgnoreCase() throws org.apache.torque.TorqueExceptionTest Criterion.setIgnoreCase().- Löst aus:
org.apache.torque.TorqueException
-
testBooleanMysql
@Test public void testBooleanMysql() throws org.apache.torque.TorqueExceptionTest that true is evaluated correctly in Mysql.- Löst aus:
org.apache.torque.TorqueException
-
testBooleanPostgresql
@Test public void testBooleanPostgresql() throws org.apache.torque.TorqueExceptionTest that true is evaluated correctly in Postgresql.- Löst aus:
org.apache.torque.TorqueException
-
testWhereDate
@Test public void testWhereDate() throws org.apache.torque.TorqueExceptionTestcase for whereDate()- Löst aus:
org.apache.torque.TorqueException
-
testAndDate
@Test public void testAndDate() throws org.apache.torque.TorqueExceptionTestcase for andDate().- Löst aus:
org.apache.torque.TorqueException
-
testDateWhere
@Test public void testDateWhere() throws org.apache.torque.TorqueExceptiontestcase for where(Date)- Löst aus:
org.apache.torque.TorqueException
-
testAndCurrentDate
@Test public void testAndCurrentDate() throws org.apache.torque.TorqueException- Löst aus:
org.apache.torque.TorqueException
-
testDistinctCount
@Test public void testDistinctCount() throws org.apache.torque.TorqueException- Löst aus:
org.apache.torque.TorqueException
-
testAndCurrentTime
@Test public void testAndCurrentTime() throws org.apache.torque.TorqueException- Löst aus:
org.apache.torque.TorqueException
-
testCriteriaOffsetLimit
@Test public void testCriteriaOffsetLimit() throws org.apache.torque.TorqueException- Löst aus:
org.apache.torque.TorqueException
-
testCriteriaWithOffsetNoLimitPostgresql
@Test public void testCriteriaWithOffsetNoLimitPostgresql() throws org.apache.torque.TorqueException- Löst aus:
org.apache.torque.TorqueException
-
testCriteriaWithOffsetNoLimitMysql
@Test public void testCriteriaWithOffsetNoLimitMysql() throws org.apache.torque.TorqueExceptionTORQUE-87- Löst aus:
org.apache.torque.TorqueException
-
testCriteriaToStringLimit
@Test public void testCriteriaToStringLimit() throws org.apache.torque.TorqueException- Löst aus:
org.apache.torque.TorqueException
-
testLikeWithoutWildcards
@Test public void testLikeWithoutWildcards() throws org.apache.torque.TorqueExceptionThis test case verifies if the Criteria.LIKE comparison type will get replaced through Criteria.EQUAL if there are no SQL wildcards in the given value.- Löst aus:
org.apache.torque.TorqueException
-
testNotLikeWithoutWildcards
@Test public void testNotLikeWithoutWildcards()This test case verifies if the Criteria.NOT_LIKE comparison type will get replaced through Criteria.NOT_EQUAL if there are no SQL wildcards in the given value. -
testSerialization
@Test public void testSerialization()Test that serialization works. -
testClone
@Test public void testClone()Test that cloning works. -
testEquals
@Test public void testEquals() throws org.apache.torque.TorqueExceptionTest thatCriteria.equals(Object)
works correctly for a simple Criteria object.- Löst aus:
org.apache.torque.TorqueException
-
testOrderBy
@Test public void testOrderBy() throws org.apache.torque.TorqueExceptionChecks whether orderBy works.- Löst aus:
org.apache.torque.TorqueException
-