db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tfisc...@apache.org
Subject svn commit: r1354812 - /db/torque/torque4/trunk/torque-runtime/src/test/java/org/apache/torque/sql/SqlBuilderTest.java
Date Thu, 28 Jun 2012 03:30:42 GMT
Author: tfischer
Date: Thu Jun 28 03:30:41 2012
New Revision: 1354812

URL: http://svn.apache.org/viewvc?rev=1354812&view=rev
Log:
Added test case where Custom is used with a null value

Modified:
    db/torque/torque4/trunk/torque-runtime/src/test/java/org/apache/torque/sql/SqlBuilderTest.java

Modified: db/torque/torque4/trunk/torque-runtime/src/test/java/org/apache/torque/sql/SqlBuilderTest.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-runtime/src/test/java/org/apache/torque/sql/SqlBuilderTest.java?rev=1354812&r1=1354811&r2=1354812&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-runtime/src/test/java/org/apache/torque/sql/SqlBuilderTest.java
(original)
+++ db/torque/torque4/trunk/torque-runtime/src/test/java/org/apache/torque/sql/SqlBuilderTest.java
Thu Jun 28 03:30:41 2012
@@ -1443,6 +1443,17 @@ public class SqlBuilderTest extends Base
         assertEquals(0, query.getPreparedStatementReplacements().size());
     }
 
+    public void testCustomLvalueNull() throws Exception
+    {
+        Criteria criteria = new Criteria();
+        criteria.addSelectColumn(new ColumnImpl("table.column"));
+        criteria.where(null, "A = functionOf(B)", Criteria.CUSTOM);
+        Query query = SqlBuilder.buildQuery(criteria);
+        assertEquals("SELECT table.column FROM table WHERE A = functionOf(B)",
+                query.toString());
+        assertEquals(0, query.getPreparedStatementReplacements().size());
+    }
+
     public void testCriterionCustom() throws Exception
     {
         Criteria criteria = 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