db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tfisc...@apache.org
Subject svn commit: r1373799 - /db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/util/BasePeerTest.java
Date Thu, 16 Aug 2012 12:23:40 GMT
Author: tfischer
Date: Thu Aug 16 12:23:40 2012
New Revision: 1373799

URL: http://svn.apache.org/viewvc?rev=1373799&view=rev
Log:
TORQUE-220 only old style criteria uses guessing of table name for doDelete()

Modified:
    db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/util/BasePeerTest.java

Modified: db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/util/BasePeerTest.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/util/BasePeerTest.java?rev=1373799&r1=1373798&r2=1373799&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/util/BasePeerTest.java
(original)
+++ db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/util/BasePeerTest.java
Thu Aug 16 12:23:40 2012
@@ -1,7 +1,7 @@
 package org.apache.torque.util;
 
 import org.apache.torque.BaseDatabaseTestCase;
-import org.apache.torque.criteria.Criteria;
+import org.apache.torque.util.Criteria;
 import org.apache.torque.test.BookPeer;
 
 /**
@@ -11,15 +11,15 @@ import org.apache.torque.test.BookPeer;
  */
 public class BasePeerTest extends BaseDatabaseTestCase
 {
-    private CountHelper countHelper = new CountHelper();
+    private final CountHelper countHelper = new CountHelper();
 
-    public void OFFtestDeleteGuessTableNameFromCriterion() throws Exception
+    public void testDeleteGuessTableNameFromCriterion() throws Exception
     {
         // prepare
         cleanBookstore();
         insertBookstoreData();
         Criteria criteria = new Criteria(BookPeer.DATABASE_NAME);
-        criteria.where(BookPeer.TITLE, "Book 1 - Author 1");
+        criteria.add(BookPeer.TITLE, "Book 1 - Author 1");
 
         // execute
         int deleted = BasePeer.doDelete(criteria);
@@ -28,7 +28,7 @@ public class BasePeerTest extends BaseDa
         assertEquals(1, deleted);
         assertEquals(99, countHelper.count(BookPeer.getTableMap()));
         criteria = new Criteria();
-        criteria.where(BookPeer.TITLE, "Book 1 - Author 1");
+        criteria.add(BookPeer.TITLE, "Book 1 - Author 1");
         assertEquals(0, countHelper.count(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