db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tfisc...@apache.org
Subject svn commit: r1448403 - /db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/generated/peer/SelectTest.java
Date Wed, 20 Feb 2013 20:55:15 GMT
Author: tfischer
Date: Wed Feb 20 20:55:15 2013
New Revision: 1448403

URL: http://svn.apache.org/r1448403
Log:
use builder pattern for constructing test criteria

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

Modified: db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/generated/peer/SelectTest.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/generated/peer/SelectTest.java?rev=1448403&r1=1448402&r2=1448403&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/generated/peer/SelectTest.java
(original)
+++ db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/generated/peer/SelectTest.java
Wed Feb 20 20:55:15 2013
@@ -262,11 +262,11 @@ public class SelectTest extends BaseData
      */
     public void testPartialSelectOnlyOwnColumns() throws Exception
     {
-        Criteria criteria = new Criteria();
         Book bookToSelect = authorList.get(0).getBooks().get(0);
-        criteria.where(BookPeer.BOOK_ID, bookToSelect.getBookId());
-        criteria.addSelectColumn(BookPeer.BOOK_ID);
-        criteria.addSelectColumn(BookPeer.TITLE);
+        Criteria criteria = new Criteria()
+            .where(BookPeer.BOOK_ID, bookToSelect.getBookId())
+            .addSelectColumn(BookPeer.BOOK_ID)
+            .addSelectColumn(BookPeer.TITLE);
 
         List<Book> books = BookPeer.doSelect(criteria);
         assertEquals(1, books.size());



---------------------------------------------------------------------
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