db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tfisc...@apache.org
Subject svn commit: r1333902 - /db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/generated/peer/JoinTest.java
Date Fri, 04 May 2012 12:18:00 GMT
Author: tfischer
Date: Fri May  4 12:18:00 2012
New Revision: 1333902

URL: http://svn.apache.org/viewvc?rev=1333902&view=rev
Log:
clean up test code

Modified:
    db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/generated/peer/JoinTest.java

Modified: db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/generated/peer/JoinTest.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/generated/peer/JoinTest.java?rev=1333902&r1=1333901&r2=1333902&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/generated/peer/JoinTest.java
(original)
+++ db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/generated/peer/JoinTest.java
Fri May  4 12:18:00 2012
@@ -323,8 +323,7 @@ public class JoinTest extends BaseDataba
         c.setRAb(rab);
         c.save();
 
-        Criteria criteria =  new Criteria();
-        criteria.add(APeer.A_ID, a.getAId());
+        Criteria criteria = new Criteria().where(APeer.A_ID, a.getAId());
         List<C> list = MyCPeer.doSelectJoinAllExceptA(criteria);
         assertTrue("list should contain 1 entry but contains "
                 + list.size(), list.size() == 1);
@@ -362,26 +361,10 @@ public class JoinTest extends BaseDataba
      */
     protected void cleanABC() throws Exception
     {
-        // clean C table
-        Criteria criteria = new Criteria();
-        criteria.add(CPeer.C_ID, (Long) null, Criteria.NOT_EQUAL);
-        CPeer.doDelete(criteria);
-
-        // clean R_AB table
-        criteria = new Criteria();
-        criteria.add(RAbPeer.A_ID, (Long) null, Criteria.NOT_EQUAL);
-        criteria.add(RAbPeer.B_ID, (Long) null, Criteria.NOT_EQUAL);
-        RAbPeer.doDelete(criteria);
-
-        // clean A table
-        criteria = new Criteria();
-        criteria.add(APeer.A_ID, (Long) null, Criteria.NOT_EQUAL);
-        APeer.doDelete(criteria);
-
-        // clean B table
-        criteria = new Criteria();
-        criteria.add(BPeer.B_ID, (Long) null, Criteria.NOT_EQUAL);
-        BPeer.doDelete(criteria);
+        CPeer.doDelete(new Criteria());
+        RAbPeer.doDelete(new Criteria());
+        APeer.doDelete(new Criteria());
+        BPeer.doDelete(new Criteria());
     }
 
     /**



---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org


Mime
View raw message