db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t.@apache.org
Subject svn commit: r1358828 - /db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/util/LargeSelectTest.java
Date Sun, 08 Jul 2012 20:17:28 GMT
Author: tv
Date: Sun Jul  8 20:17:28 2012
New Revision: 1358828

URL: http://svn.apache.org/viewvc?rev=1358828&view=rev
Log:
Preliminary fix tests

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

Modified: db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/util/LargeSelectTest.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/util/LargeSelectTest.java?rev=1358828&r1=1358827&r2=1358828&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/util/LargeSelectTest.java
(original)
+++ db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/util/LargeSelectTest.java
Sun Jul  8 20:17:28 2012
@@ -94,13 +94,12 @@ public class LargeSelectTest extends Bas
     /**
      * Test an invalid criteria - includes a limit.
      */
-    public void testBadCriteria11() throws TorqueException
+    public void testBadCriteria11()
     {
         criteria.setLimit(1);
         try
         {
             new LargeSelect<Author>(criteria, TEST_PAGE_SIZE,
-                    "org.apache.torque.test.AuthorPeer",
                     new AuthorRecordMapper());
         }
         catch (IllegalArgumentException success)
@@ -112,13 +111,12 @@ public class LargeSelectTest extends Bas
     /**
      * Test an invalid criteria - includes an offset.
      */
-    public void testBadCriteria12() throws TorqueException
+    public void testBadCriteria12()
     {
         criteria.setOffset(1);
         try
         {
             new LargeSelect<Author>(criteria, TEST_PAGE_SIZE,
-                    "org.apache.torque.test.AuthorPeer",
                     new AuthorRecordMapper());
         }
         catch (IllegalArgumentException success)
@@ -130,12 +128,11 @@ public class LargeSelectTest extends Bas
     /**
      * Test an invalid page size.
      */
-    public void testBadPageSize() throws TorqueException
+    public void testBadPageSize()
     {
         try
         {
             new LargeSelect<Author>(criteria, 0,
-                    "org.apache.torque.test.AuthorPeer",
                     new AuthorRecordMapper());
         }
         catch (IllegalArgumentException success)
@@ -147,12 +144,11 @@ public class LargeSelectTest extends Bas
     /**
      * Test an invalid memory limit.
      */
-    public void testBadMemoryLimit() throws TorqueException
+    public void testBadMemoryLimit()
     {
         try
         {
             new LargeSelect<Author>(criteria, TEST_PAGE_SIZE, 0,
-                    "org.apache.torque.test.AuthorPeer",
                     new AuthorRecordMapper());
         }
         catch (IllegalArgumentException success)
@@ -162,25 +158,9 @@ public class LargeSelectTest extends Bas
     }
 
     /**
-     * Test an invalid builder class (doesn't provide necessary methods).
-     */
-    public void testBadClass()
-    {
-        try
-        {
-            new LargeSelect<Author>(criteria, TEST_PAGE_SIZE,
-                    "org.apache.torque.test.Author",
-                    new AuthorRecordMapper());
-        }
-        catch (IllegalArgumentException success)
-        {
-        }
-    }
-
-    /**
      * Test a couple of static methods.
      */
-    public void testStaticMethods() throws TorqueException
+/*    public void testStaticMethods() throws TorqueException
     {
         assertEquals("Memory page limit", 5, LargeSelect.getMemoryPageLimit());
         LargeSelect.setMemoryPageLimit(10);
@@ -196,16 +176,16 @@ public class LargeSelectTest extends Bas
         LargeSelect.setMoreIndicator(LargeSelect.DEFAULT_MORE_INDICATOR);
         assertEquals("More indicator", "&gt;", LargeSelect.getMoreIndicator());
     }
-
+*/
     /**
      * Test a bunch of different methods when everything is set up correctly.
      */
     public void testLargeSelect() throws TorqueException
     {
+        AuthorPeer.addSelectColumns(criteria);
         LargeSelect<Author> ls = new LargeSelect<Author>(
                 criteria,
                 TEST_PAGE_SIZE,
-                "org.apache.torque.test.AuthorPeer",
                 new AuthorRecordMapper());
 
         assertEquals("Page size", TEST_PAGE_SIZE, ls.getPageSize());
@@ -331,11 +311,11 @@ public class LargeSelectTest extends Bas
     {
         // Alter criteria to retrieve only one row
         criteria.add(AuthorPeer.AUTHOR_ID, firstAuthorId);
+        AuthorPeer.addSelectColumns(criteria);
 
         LargeSelect<Author> ls = new LargeSelect<Author>(
                 criteria,
                 TEST_PAGE_SIZE,
-                "org.apache.torque.test.AuthorPeer",
                 new AuthorRecordMapper());
 
         // Page 1
@@ -361,10 +341,10 @@ public class LargeSelectTest extends Bas
      */
     public void testInvalidateResult() throws Exception
     {
+        AuthorPeer.addSelectColumns(criteria);
         LargeSelect<Author> ls = new LargeSelect<Author>(
                 criteria,
                 TEST_PAGE_SIZE,
-                "org.apache.torque.test.AuthorPeer",
                 new AuthorRecordMapper());
 
         assertEquals("Page size", TEST_PAGE_SIZE, ls.getPageSize());



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