|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjunit.framework.Assert
junit.framework.TestCase
org.apache.torque.BaseTestCase
org.apache.torque.criteria.CriteriaTest
public class CriteriaTest
Test class for Criteria.
Field Summary |
---|
Fields inherited from class org.apache.torque.BaseTestCase |
---|
CONFIG_FILE, database, databaseMap, databaseMysql, databaseOracle, databasePostgresql, integerColumnMap, stringColumnMap, tableMap |
Constructor Summary | |
---|---|
CriteriaTest()
|
Method Summary | |
---|---|
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. |
Methods inherited from class junit.framework.TestCase |
---|
countTestCases, createResult, getName, run, run, runBare, runTest, setName, tearDown, toString |
Methods inherited from class junit.framework.Assert |
---|
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public CriteriaTest()
Method Detail |
---|
public void setUp() throws Exception
setUp
in class BaseTestCase
Exception
- if initialisation fails.public void testWhereString()
public void testWhereStringReversed()
public void testWhereNotEqual()
public void testWhereUnaryOperator()
public void testOrUnaryOperator()
public void testAndString()
public void testCriteriaTopLevelCriterionGetsCopiedWhere()
public void testCriteriaTopLevelCriterionGetsCopiedOr()
public void testCriteriaCriterionGetsCopiedWhere()
public void testCriteriaCriterionGetsCopiedOr()
public void testCriterionDoesNotGetChangedByCriteriaOr()
public void testCriterionDoesNotGetChangedByCriteriaAnd()
public void testNestedCriterionComparisonEqual() throws org.apache.torque.TorqueException
org.apache.torque.TorqueException
public void testNestedCriterionComparisonLessGreaterThan() throws org.apache.torque.TorqueException
org.apache.torque.TorqueException
public void testBetweenCriterion() throws org.apache.torque.TorqueException
org.apache.torque.TorqueException
public void testCriterionIgnoreCase() throws org.apache.torque.TorqueException
org.apache.torque.TorqueException
public void testBooleanMysql() throws org.apache.torque.TorqueException
org.apache.torque.TorqueException
public void testBooleanPostgresql() throws org.apache.torque.TorqueException
org.apache.torque.TorqueException
public void testWhereDate() throws org.apache.torque.TorqueException
org.apache.torque.TorqueException
public void testAndDate() throws org.apache.torque.TorqueException
org.apache.torque.TorqueException
public void testDateWhere() throws org.apache.torque.TorqueException
org.apache.torque.TorqueException
public void testAndCurrentDate() throws org.apache.torque.TorqueException
org.apache.torque.TorqueException
public void testAndCurrentTime() throws org.apache.torque.TorqueException
org.apache.torque.TorqueException
public void testCriteriaOffsetLimit() throws org.apache.torque.TorqueException
org.apache.torque.TorqueException
public void testCriteriaWithOffsetNoLimitPostgresql() throws org.apache.torque.TorqueException
org.apache.torque.TorqueException
public void testCriteriaWithOffsetNoLimitMysql() throws org.apache.torque.TorqueException
org.apache.torque.TorqueException
public void testCriteriaToStringLimit() throws org.apache.torque.TorqueException
org.apache.torque.TorqueException
public void testLikeWithoutWildcards() throws org.apache.torque.TorqueException
org.apache.torque.TorqueException
public void testNotLikeWithoutWildcards()
public void testSerialization()
public void testClone()
public void testEquals() throws org.apache.torque.TorqueException
Criteria.equals(Object)
works correctly for a simple
Criteria object.
org.apache.torque.TorqueException
public void testOrderBy() throws org.apache.torque.TorqueException
org.apache.torque.TorqueException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |