db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tfisc...@apache.org
Subject svn commit: r1070058 - /db/torque/torque4/trunk/torque-runtime/src/test/java/org/apache/torque/util/SqlExpressionTest.java
Date Sat, 12 Feb 2011 12:04:23 GMT
Author: tfischer
Date: Sat Feb 12 12:04:23 2011
New Revision: 1070058

URL: http://svn.apache.org/viewvc?rev=1070058&view=rev
Log:
- fix test for changed Fixed "In" queries

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

Modified: db/torque/torque4/trunk/torque-runtime/src/test/java/org/apache/torque/util/SqlExpressionTest.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-runtime/src/test/java/org/apache/torque/util/SqlExpressionTest.java?rev=1070058&r1=1070057&r2=1070058&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-runtime/src/test/java/org/apache/torque/util/SqlExpressionTest.java
(original)
+++ db/torque/torque4/trunk/torque-runtime/src/test/java/org/apache/torque/util/SqlExpressionTest.java
Sat Feb 12 12:04:23 2011
@@ -69,14 +69,16 @@ public class SqlExpressionTest extends T
      */
     public void testBuildPsIn()
         {
-        String[] values = new String[] { "42", "43", "44" };
+        String[] values = new String[] {"42", "43", "44"};
         StringBuilder result = new StringBuilder();
         List<Object> replacements = new ArrayList<Object>();
         SqlExpression.buildPsIn("COL", values, SqlEnum.IN, "?",
                 false, db, result, replacements);
-        assertEquals("COL IN (?)", result.toString());
-        assertEquals(1, replacements.size());
-        assertEquals(values, replacements.get(0));
+        assertEquals("COL IN (?,?,?)", result.toString());
+        assertEquals(3, replacements.size());
+        assertEquals("42", replacements.get(0));
+        assertEquals("43", replacements.get(1));
+        assertEquals("44", replacements.get(2));
     }
 
     /**



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