db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d..@apache.org
Subject cvs commit: db-torque/src/test/org/apache/torque/om ComboKeyTest.java
Date Thu, 19 Jun 2003 04:05:54 GMT
dlr         2003/06/18 21:05:54

  Modified:    src/test/org/apache/torque/util CriteriaTest.java
                        QueryTest.java
               src/test/org/apache/torque/om ComboKeyTest.java
  Log:
  * src/test/org/apache/torque/util/CriteriaTest.java
    testCriterionIgnoreCase()
  
    Actually performed an equality assertion.
  
  * src/test/org/apache/torque/util/CriteriaTest.java
    testCriterionIgnoreCase(), testAddDate()
  * src/test/org/apache/torque/util/QueryTest.java
    testColumns(), testToString()
  * src/test/org/apache/torque/om/ComboKeyTest.java
    testRoundTripWithStringKeys(), testRoundTripWithComplexKey(),
    testRoundTripWithNullKey()
  
    Removed calls to System.out.println() which add little value over
    the assertion failure message.
  
  Revision  Changes    Path
  1.19      +5 -7      db-torque/src/test/org/apache/torque/util/CriteriaTest.java
  
  Index: CriteriaTest.java
  ===================================================================
  RCS file: /home/cvs/db-torque/src/test/org/apache/torque/util/CriteriaTest.java,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -u -r1.18 -r1.19
  --- CriteriaTest.java	24 Mar 2003 21:53:43 -0000	1.18
  +++ CriteriaTest.java	19 Jun 2003 04:05:54 -0000	1.19
  @@ -267,12 +267,11 @@
       {
           Criteria myCriteria = new Criteria();
   
  -        Criteria.Criterion myCriterion = myCriteria.getNewCriterion(
  +        Criteria.Criterion expected = myCriteria.getNewCriterion(
                   "TABLE.COLUMN", (Object)"FoObAr", Criteria.LIKE);
  -        System.out.println("before setIgnoreCase: " + myCriterion);
  -
  -        Criteria.Criterion ignoreCriterion = myCriterion.setIgnoreCase(true);
  -        System.out.println("after setIgnoreCase: " + ignoreCriterion);
  +        Criteria.Criterion result = expected.setIgnoreCase(true);
  +        assertEquals("Criterion mis-match after calling setIgnoreCase(true)",
  +                     expected.toString(), result.toString());
       }
   
       /**
  @@ -332,7 +331,6 @@
               e.printStackTrace();
               fail("TorqueException thrown in BasePeer.createQueryString()");
           }
  -        System.out.println(result);
           assertEquals(expect, result);
       }
   
  
  
  
  1.4       +1 -5      db-torque/src/test/org/apache/torque/util/QueryTest.java
  
  Index: QueryTest.java
  ===================================================================
  RCS file: /home/cvs/db-torque/src/test/org/apache/torque/util/QueryTest.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -u -r1.3 -r1.4
  --- QueryTest.java	24 Mar 2003 21:53:43 -0000	1.3
  +++ QueryTest.java	19 Jun 2003 04:05:54 -0000	1.4
  @@ -89,8 +89,6 @@
           columns.add("tableB.column1");
           query.setSelectClause(columns);
   
  -        System.out.println(expected);
  -        System.out.println(query.toString());
           assertEquals(expected, query.toString());
       }
   
  @@ -120,8 +118,6 @@
           where.add("tableA.B = 1234");
           query.setWhereClause(where);
   
  -        System.out.println(expected);
  -        System.out.println(query.toString());
           assertEquals(expected, query.toString());
       }
   }
  
  
  
  1.4       +1 -4      db-torque/src/test/org/apache/torque/om/ComboKeyTest.java
  
  Index: ComboKeyTest.java
  ===================================================================
  RCS file: /home/cvs/db-torque/src/test/org/apache/torque/om/ComboKeyTest.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -u -r1.3 -r1.4
  --- ComboKeyTest.java	21 Mar 2003 17:31:09 -0000	1.3
  +++ ComboKeyTest.java	19 Jun 2003 04:05:54 -0000	1.4
  @@ -162,7 +162,6 @@
               new SimpleKey[]{new StringKey("key1"), new StringKey("key2")});
           ComboKey newKey = null;
           String stringValue = oldKey.toString();
  -        System.out.println("OldKey as String=" + stringValue);
           try
           {
               newKey = new ComboKey(stringValue);
  @@ -188,7 +187,6 @@
               new DateKey(new java.util.Date())});
           ComboKey newKey = null;
           String stringValue = oldKey.toString();
  -        System.out.println("OldKey as String=" + stringValue);
           try
           {
               newKey = new ComboKey(stringValue);
  @@ -213,7 +211,6 @@
               new SimpleKey[]{new StringKey("key1"), null});
           ComboKey newKey = null;
           String stringValue = oldKey.toString();
  -        System.out.println("OldKey as String=" + stringValue);
           try
           {
               newKey = new ComboKey(stringValue);
  
  
  

Mime
View raw message