public class CriteriaTest extends BaseTestCase
CONFIG_FILE, database, databaseMap, databaseMysql, databaseOracle, databasePostgresql, integerColumnMap, stringColumnMap, stringColumnMap2, stringColumnMap3, tableMap
Constructor and Description |
---|
CriteriaTest() |
Modifier and Type | Method and Description |
---|---|
void |
setUp()
Initializes the criteria.
|
void |
testAndCurrentDate() |
void |
testAndCurrentTime() |
void |
testAndDate()
Testcase for andDate().
|
void |
testAndString()
Test where condition with several ANDs compairing against Strings.
|
void |
testBetweenCriterion()
Tests <= and =>.
|
void |
testBooleanMysql()
Test that true is evaluated correctly in Mysql.
|
void |
testBooleanPostgresql()
Test that true is evaluated correctly in Postgresql.
|
void |
testClone()
Test that cloning works.
|
void |
testCriteriaCriterionGetsCopiedOr()
Tests that a criterion is copied when being added as top level criterion
using where (also tests and).
|
void |
testCriteriaCriterionGetsCopiedWhere()
Tests that a criterion is copied when being added as top level criterion
using where (also tests and).
|
void |
testCriteriaOffsetLimit() |
void |
testCriteriaTopLevelCriterionGetsCopiedOr()
Tests that a criterion is copied when being added as top level criterion
using where (also tests and).
|
void |
testCriteriaTopLevelCriterionGetsCopiedWhere()
Tests that a criterion is copied when being added as top level criterion
using where (also tests and).
|
void |
testCriteriaToStringLimit() |
void |
testCriteriaWithOffsetNoLimitMysql()
TORQUE-87
|
void |
testCriteriaWithOffsetNoLimitPostgresql() |
void |
testCriterionDoesNotGetChangedByCriteriaAnd()
Tests that a criterion does not get changed if it is added as
root criterion to a criteria which is afterwards changed.
|
void |
testCriterionDoesNotGetChangedByCriteriaOr()
Tests that a criterion does not get changed if it is added as
root criterion to a criteria which is afterwards changed.
|
void |
testCriterionIgnoreCase()
Test Criterion.setIgnoreCase().
|
void |
testDateWhere()
testcase for where(Date)
|
void |
testEquals()
Test that
Criteria.equals(Object) works correctly for a simple
Criteria object. |
void |
testLikeWithoutWildcards()
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 |
testNestedCriterionComparisonEqual()
Test that nesting Criterions works for equals comparison.
|
void |
testNestedCriterionComparisonLessGreaterThan()
Test that nesting Criterions works for other comparisons than equal.
|
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.
|
void |
testOrderBy()
Checks whether orderBy works.
|
void |
testOrUnaryOperator()
Tests that unary operators as rValue are interpreted
as comparison operator in the two-arg or method.
|
void |
testSerialization()
Test that serialization works.
|
void |
testWhereDate()
Testcase for whereDate()
|
void |
testWhereNotEqual()
Test basic where condition on a string with a non-equal.
|
void |
testWhereString()
Test basic where condition on a string.
|
void |
testWhereStringReversed()
Test basic where condition on a string.
|
void |
testWhereUnaryOperator()
Tests that unary operators as rValue are interpreted
as comparison operator in the two-arg where method.
|
@BeforeEach public void setUp() throws Exception
setUp
in class BaseTestCase
Exception
- if initialization fails.@Test public void testWhereString()
@Test public void testWhereStringReversed()
@Test public void testWhereNotEqual()
@Test public void testWhereUnaryOperator()
@Test public void testOrUnaryOperator()
@Test public void testAndString()
@Test public void testCriteriaTopLevelCriterionGetsCopiedWhere()
@Test public void testCriteriaTopLevelCriterionGetsCopiedOr()
@Test public void testCriteriaCriterionGetsCopiedWhere()
@Test public void testCriteriaCriterionGetsCopiedOr()
@Test public void testCriterionDoesNotGetChangedByCriteriaOr()
@Test public void testCriterionDoesNotGetChangedByCriteriaAnd()
@Test public void testNestedCriterionComparisonEqual() throws TorqueException
TorqueException
@Test public void testNestedCriterionComparisonLessGreaterThan() throws TorqueException
TorqueException
- if fails@Test public void testBetweenCriterion() throws TorqueException
TorqueException
- if fail@Test public void testCriterionIgnoreCase() throws TorqueException
TorqueException
@Test public void testBooleanMysql() throws TorqueException
TorqueException
@Test public void testBooleanPostgresql() throws TorqueException
TorqueException
@Test public void testWhereDate() throws TorqueException
TorqueException
@Test public void testAndDate() throws TorqueException
TorqueException
@Test public void testDateWhere() throws TorqueException
TorqueException
@Test public void testAndCurrentDate() throws TorqueException
TorqueException
@Test public void testAndCurrentTime() throws TorqueException
TorqueException
@Test public void testCriteriaOffsetLimit() throws TorqueException
TorqueException
@Test public void testCriteriaWithOffsetNoLimitPostgresql() throws TorqueException
TorqueException
@Test public void testCriteriaWithOffsetNoLimitMysql() throws TorqueException
TorqueException
@Test public void testCriteriaToStringLimit() throws TorqueException
TorqueException
@Test public void testLikeWithoutWildcards() throws TorqueException
TorqueException
@Test public void testNotLikeWithoutWildcards()
@Test public void testSerialization()
@Test public void testClone()
@Test public void testEquals() throws TorqueException
Criteria.equals(Object)
works correctly for a simple
Criteria object.TorqueException
@Test public void testOrderBy() throws TorqueException
TorqueException
Copyright © 2000–2020 The Apache Software Foundation. All rights reserved.