db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d..@apache.org
Subject svn commit: r520739 - /db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/JDBC.java
Date Wed, 21 Mar 2007 04:07:21 GMT
Author: djd
Date: Tue Mar 20 21:07:20 2007
New Revision: 520739

URL: http://svn.apache.org/viewvc?view=rev&rev=520739
Log:
Clean up error messages for new JDBC.assertParameterTypes() to indicate a problem
with parameters and not columns if a failure occurs. This will just reduce confusion
for anyone debugging a test failure.

Modified:
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/JDBC.java

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/JDBC.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/JDBC.java?view=diff&rev=520739&r1=520738&r2=520739
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/JDBC.java (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/JDBC.java Tue Mar 20 21:07:20
2007
@@ -542,8 +542,8 @@
     /**
      * Takes a Prepared Statement and an array of expected parameter types
      * from java.sql.Types 
-     * and asserts that the column types in the ParamterMetaData
-     * match the number, order, and names of those
+     * and asserts that the parameter types in the ParamterMetaData
+     * match the number and order of those
      * in the array.
      * @param ps PreparedStatement for which we're checking parameter names.
      * @param expectedTypes Array of expected parameter types.
@@ -552,14 +552,14 @@
 	        int[] expectedTypes) throws SQLException
 	    {
 		ParameterMetaData pmd = ps.getParameterMetaData();
-	        int actualCols = pmd.getParameterCount();
+	        int actualParams = pmd.getParameterCount();
 
-	        Assert.assertEquals("Unexpected column count:",
+	        Assert.assertEquals("Unexpected parameter count:",
 	                expectedTypes.length, pmd.getParameterCount());
 
-	        for (int i = 0; i < actualCols; i++)
+	        for (int i = 0; i < actualParams; i++)
 	        {
-	            Assert.assertEquals("Column types do not match for column " + (i+1),
+	            Assert.assertEquals("Types do not match for parameter " + (i+1),
 	                    expectedTypes[i], pmd.getParameterType(i+1));
 	        }
 	    }



Mime
View raw message