You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ddlutils-dev@db.apache.org by to...@apache.org on 2009/12/26 01:58:27 UTC

svn commit: r893918 - in /db/ddlutils/trunk/src/test/java/org/apache/ddlutils: ./ dynabean/ io/ platform/ task/

Author: tomdz
Date: Sat Dec 26 00:58:26 2009
New Revision: 893918

URL: http://svn.apache.org/viewvc?rev=893918&view=rev
Log:
Unit test fixes

Modified:
    db/ddlutils/trunk/src/test/java/org/apache/ddlutils/TestAgainstLiveDatabaseBase.java
    db/ddlutils/trunk/src/test/java/org/apache/ddlutils/dynabean/TestDynaSqlQueries.java
    db/ddlutils/trunk/src/test/java/org/apache/ddlutils/io/TestChangeColumn.java
    db/ddlutils/trunk/src/test/java/org/apache/ddlutils/io/TestDataReaderAndWriter.java
    db/ddlutils/trunk/src/test/java/org/apache/ddlutils/io/TestInsertColumn.java
    db/ddlutils/trunk/src/test/java/org/apache/ddlutils/platform/TestMySql50Platform.java
    db/ddlutils/trunk/src/test/java/org/apache/ddlutils/platform/TestMySqlPlatform.java
    db/ddlutils/trunk/src/test/java/org/apache/ddlutils/task/TestWriteDataToDatabaseCommand.java
    db/ddlutils/trunk/src/test/java/org/apache/ddlutils/task/TestWriteDataToFileCommand.java
    db/ddlutils/trunk/src/test/java/org/apache/ddlutils/task/TestWriteSchemaToFileCommand.java

Modified: db/ddlutils/trunk/src/test/java/org/apache/ddlutils/TestAgainstLiveDatabaseBase.java
URL: http://svn.apache.org/viewvc/db/ddlutils/trunk/src/test/java/org/apache/ddlutils/TestAgainstLiveDatabaseBase.java?rev=893918&r1=893917&r2=893918&view=diff
==============================================================================
--- db/ddlutils/trunk/src/test/java/org/apache/ddlutils/TestAgainstLiveDatabaseBase.java (original)
+++ db/ddlutils/trunk/src/test/java/org/apache/ddlutils/TestAgainstLiveDatabaseBase.java Sat Dec 26 00:58:26 2009
@@ -214,6 +214,9 @@
 
     /**
      * Initializes the test datasource and the platform.
+     * 
+     * @param props The properties to initialize from
+     * @return The data source object
      */
     private static DataSource initDataSourceFromProperties(Properties props)
     {
@@ -561,7 +564,7 @@
      * @param tableName    The name of the table (case insensitive)
      * @param oldBean      The bean representing the current row
      * @param columnValues The values for the columns in order of definition
-     * @returne The dyna bean for the new row
+     * @return The dyna bean for the new row
      */
     protected DynaBean updateRow(String tableName, DynaBean oldBean, Object[] columnValues)
     {
@@ -1310,24 +1313,34 @@
         }
 
         CascadeActionEnum realExpectedOnUpdateAction = expected.getOnUpdate();
+        CascadeActionEnum realActualOnUpdateAction   = actual.getOnUpdate();
 
-        if (!getPlatformInfo().isActionSupportedForOnUpdate(realExpectedOnUpdateAction))
+        if (!getPlatformInfo().isActionSupportedForOnUpdate(realExpectedOnUpdateAction) || (realExpectedOnUpdateAction == CascadeActionEnum.NONE))
         {
             realExpectedOnUpdateAction = getPlatformInfo().getDefaultOnUpdateAction();
         }
+        if (!getPlatformInfo().isActionSupportedForOnUpdate(realActualOnUpdateAction) || (realActualOnUpdateAction == CascadeActionEnum.NONE))
+        {
+            realActualOnUpdateAction = getPlatformInfo().getDefaultOnUpdateAction();
+        }
         assertEquals("Not the same onUpdate setting in foreign key "+actual.getName()+".",
                      realExpectedOnUpdateAction,
-                     actual.getOnUpdate());
+                     realActualOnUpdateAction);
 
         CascadeActionEnum realExpectedOnDeleteAction = expected.getOnDelete();
+        CascadeActionEnum realActualOnDeleteAction   = actual.getOnDelete();
 
-        if (!getPlatformInfo().isActionSupportedForOnDelete(realExpectedOnDeleteAction))
+        if (!getPlatformInfo().isActionSupportedForOnDelete(realExpectedOnDeleteAction) || (realExpectedOnDeleteAction == CascadeActionEnum.NONE))
         {
             realExpectedOnDeleteAction = getPlatformInfo().getDefaultOnDeleteAction();
         }
+        if (!getPlatformInfo().isActionSupportedForOnDelete(realActualOnDeleteAction) || (realActualOnDeleteAction == CascadeActionEnum.NONE))
+        {
+            realActualOnDeleteAction = getPlatformInfo().getDefaultOnDeleteAction();
+        }
         assertEquals("Not the same onDelete setting in foreign key "+actual.getName()+".",
                      realExpectedOnDeleteAction,
-                     actual.getOnDelete());
+                     realActualOnDeleteAction);
 
         assertEquals("Not the same number of references in foreign key "+actual.getName()+".",
                      expected.getReferenceCount(),

Modified: db/ddlutils/trunk/src/test/java/org/apache/ddlutils/dynabean/TestDynaSqlQueries.java
URL: http://svn.apache.org/viewvc/db/ddlutils/trunk/src/test/java/org/apache/ddlutils/dynabean/TestDynaSqlQueries.java?rev=893918&r1=893917&r2=893918&view=diff
==============================================================================
--- db/ddlutils/trunk/src/test/java/org/apache/ddlutils/dynabean/TestDynaSqlQueries.java (original)
+++ db/ddlutils/trunk/src/test/java/org/apache/ddlutils/dynabean/TestDynaSqlQueries.java Sat Dec 26 00:58:26 2009
@@ -50,10 +50,10 @@
     }
 
     /**
-     * Returns the SQL to select all rows from the indicated table.
+     * Helper method to wrap the given identifier in delimiters if delimited identifier mode is turned on for the test.
      * 
-     * @param tableName The name of the table to query
-     * @return The SQL
+     * @param name The identifier
+     * @return The identifier, wrapped if delimited identifier mode is turned on, or as-is if not
      */
     private String asIdentifier(String name)
     {

Modified: db/ddlutils/trunk/src/test/java/org/apache/ddlutils/io/TestChangeColumn.java
URL: http://svn.apache.org/viewvc/db/ddlutils/trunk/src/test/java/org/apache/ddlutils/io/TestChangeColumn.java?rev=893918&r1=893917&r2=893918&view=diff
==============================================================================
--- db/ddlutils/trunk/src/test/java/org/apache/ddlutils/io/TestChangeColumn.java (original)
+++ db/ddlutils/trunk/src/test/java/org/apache/ddlutils/io/TestChangeColumn.java Sat Dec 26 00:58:26 2009
@@ -3120,8 +3120,8 @@
         List beans = getRows("roundtrip");
 
         assertEquals(new Integer(1), beans.get(0), "pk");
-        assertEquals(value,          beans.get(0), "avalue1");
         assertEquals(time,           beans.get(0), "avalue2");
+        assertEquals(value,          beans.get(0), "avalue1");
     }
 
     /**

Modified: db/ddlutils/trunk/src/test/java/org/apache/ddlutils/io/TestDataReaderAndWriter.java
URL: http://svn.apache.org/viewvc/db/ddlutils/trunk/src/test/java/org/apache/ddlutils/io/TestDataReaderAndWriter.java?rev=893918&r1=893917&r2=893918&view=diff
==============================================================================
--- db/ddlutils/trunk/src/test/java/org/apache/ddlutils/io/TestDataReaderAndWriter.java (original)
+++ db/ddlutils/trunk/src/test/java/org/apache/ddlutils/io/TestDataReaderAndWriter.java Sat Dec 26 00:58:26 2009
@@ -42,24 +42,41 @@
  */
 public class TestDataReaderAndWriter extends TestCase
 {
-    // no need to call start/end as the don't do anything anyways
+    /**
+     * A test data sink. There is no need to call start/end as the don't do anything anyways in this class.
+     */
     private static class TestDataSink implements DataSink
     {
+        /** Stores the read objects. */
         private final ArrayList readObjects;
 
+        /**
+         * Creates a new test data sink using the given list as the backing store.
+         * 
+         * @param readObjects The list to store the read object
+         */
         private TestDataSink(ArrayList readObjects)
         {
             this.readObjects = readObjects;
         }
 
+        /**
+         * {@inheritDoc}
+         */
         public void start() throws DataSinkException
         {}
 
+        /**
+         * {@inheritDoc}
+         */
         public void addBean(DynaBean bean) throws DataSinkException
         {
             readObjects.add(bean);
         }
 
+        /**
+         * {@inheritDoc}
+         */
         public void end() throws DataSinkException
         {}
     }

Modified: db/ddlutils/trunk/src/test/java/org/apache/ddlutils/io/TestInsertColumn.java
URL: http://svn.apache.org/viewvc/db/ddlutils/trunk/src/test/java/org/apache/ddlutils/io/TestInsertColumn.java?rev=893918&r1=893917&r2=893918&view=diff
==============================================================================
--- db/ddlutils/trunk/src/test/java/org/apache/ddlutils/io/TestInsertColumn.java (original)
+++ db/ddlutils/trunk/src/test/java/org/apache/ddlutils/io/TestInsertColumn.java Sat Dec 26 00:58:26 2009
@@ -27,6 +27,7 @@
 import org.apache.commons.beanutils.DynaBean;
 import org.apache.ddlutils.TestAgainstLiveDatabaseBase;
 import org.apache.ddlutils.platform.hsqldb.HsqlDbPlatform;
+import org.apache.ddlutils.platform.maxdb.MaxDbPlatform;
 import org.apache.ddlutils.platform.mysql.MySql50Platform;
 import org.apache.ddlutils.platform.mysql.MySqlPlatform;
 import org.apache.ddlutils.platform.sybase.SybasePlatform;
@@ -333,7 +334,8 @@
 
         if (MySqlPlatform.DATABASENAME.equals(getPlatform().getName()) ||
             MySql50Platform.DATABASENAME.equals(getPlatform().getName()) ||
-            HsqlDbPlatform.DATABASENAME.equals(getPlatform().getName()))
+            HsqlDbPlatform.DATABASENAME.equals(getPlatform().getName()) ||
+            MaxDbPlatform.DATABASENAME.equals(getPlatform().getName()))
         {
             // Some DBs ignore that the type is CHAR(8) and trim the value
             assertEquals("text", avalue);
@@ -670,6 +672,11 @@
      */
     public void testInsertNonUniqueIndexAndColumn()
     {
+        if (!getPlatformInfo().isIndicesSupported())
+        {
+            return;
+        }
+
         final String model1Xml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n"+
             "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='roundtriptest'>\n"+
@@ -708,7 +715,8 @@
      */
     public void testInsertNonUniqueIndexAndAutoIncrementColumn()
     {
-        if (!getPlatformInfo().isNonPrimaryKeyIdentityColumnsSupported())
+        if (!getPlatformInfo().isNonPrimaryKeyIdentityColumnsSupported() ||
+            !getPlatformInfo().isIndicesSupported())
         {
             return;
         }
@@ -751,6 +759,11 @@
      */
     public void testInsertNonUniqueIndexAndRequiredColumn()
     {
+        if (!getPlatformInfo().isIndicesSupported())
+        {
+            return;
+        }
+
         final String model1Xml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n"+
             "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='roundtriptest'>\n"+
@@ -787,6 +800,11 @@
      */
     public void testInsertNonUniqueIndexAndColumnWithDefault()
     {
+        if (!getPlatformInfo().isIndicesSupported())
+        {
+            return;
+        }
+
         final String model1Xml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n"+
             "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='roundtriptest'>\n"+
@@ -825,7 +843,8 @@
      */
     public void testInsertNonUniqueIndexAndrequiredAutoIncrementColumn()
     {
-        if (!getPlatformInfo().isNonPrimaryKeyIdentityColumnsSupported())
+        if (!getPlatformInfo().isNonPrimaryKeyIdentityColumnsSupported() ||
+            !getPlatformInfo().isIndicesSupported())
         {
             return;
         }
@@ -868,6 +887,11 @@
      */
     public void testInsertNonUniqueIndexAndRequiredColumnWithDefault()
     {
+        if (!getPlatformInfo().isIndicesSupported())
+        {
+            return;
+        }
+
         final String model1Xml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n"+
             "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='roundtriptest'>\n"+
@@ -901,7 +925,8 @@
 
         if (MySqlPlatform.DATABASENAME.equals(getPlatform().getName()) ||
             MySql50Platform.DATABASENAME.equals(getPlatform().getName()) ||
-            HsqlDbPlatform.DATABASENAME.equals(getPlatform().getName()))
+            HsqlDbPlatform.DATABASENAME.equals(getPlatform().getName()) ||
+            MaxDbPlatform.DATABASENAME.equals(getPlatform().getName()))
         {
             // Some DBs ignore that the type is CHAR(8) and trim the value
             assertEquals("text", avalue);
@@ -917,6 +942,11 @@
      */
     public void testAddAndInsertNonUniqueIndexAndMultipleColumns()
     {
+        if (!getPlatformInfo().isIndicesSupported())
+        {
+            return;
+        }
+
         final String model1Xml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n"+
             "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='roundtriptest'>\n"+
@@ -950,12 +980,16 @@
         assertTrue(getRows("roundtrip").isEmpty());
     }
 
-
     /**
      * Tests the insertion of an unique index and a column.
      */
     public void testInsertUniqueIndexAndColumn()
     {
+        if (!getPlatformInfo().isIndicesSupported())
+        {
+            return;
+        }
+
         final String model1Xml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n"+
             "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='roundtriptest'>\n"+
@@ -994,7 +1028,8 @@
      */
     public void testInsertUniqueIndexAndAutoIncrementColumn()
     {
-        if (!getPlatformInfo().isNonPrimaryKeyIdentityColumnsSupported())
+        if (!getPlatformInfo().isNonPrimaryKeyIdentityColumnsSupported() ||
+            !getPlatformInfo().isIndicesSupported())
         {
             return;
         }
@@ -1037,6 +1072,11 @@
      */
     public void testInsertUniqueIndexAndRequiredColumn()
     {
+        if (!getPlatformInfo().isIndicesSupported())
+        {
+            return;
+        }
+
         final String model1Xml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n"+
             "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='roundtriptest'>\n"+
@@ -1073,6 +1113,11 @@
      */
     public void testInsertUniqueIndexAndColumnWithDefault()
     {
+        if (!getPlatformInfo().isIndicesSupported())
+        {
+            return;
+        }
+
         final String model1Xml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n"+
             "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='roundtriptest'>\n"+
@@ -1111,7 +1156,8 @@
      */
     public void testInsertUniqueIndexAndRequiredAutoIncrementColumn()
     {
-        if (!getPlatformInfo().isNonPrimaryKeyIdentityColumnsSupported())
+        if (!getPlatformInfo().isNonPrimaryKeyIdentityColumnsSupported() ||
+            !getPlatformInfo().isIndicesSupported())
         {
             return;
         }
@@ -1154,6 +1200,11 @@
      */
     public void testInsertUniqueIndexAndRequiredColumnWithDefault()
     {
+        if (!getPlatformInfo().isIndicesSupported())
+        {
+            return;
+        }
+
         final String model1Xml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n"+
             "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='roundtriptest'>\n"+
@@ -1187,7 +1238,8 @@
 
         if (MySqlPlatform.DATABASENAME.equals(getPlatform().getName()) ||
             MySql50Platform.DATABASENAME.equals(getPlatform().getName()) ||
-            HsqlDbPlatform.DATABASENAME.equals(getPlatform().getName()))
+            HsqlDbPlatform.DATABASENAME.equals(getPlatform().getName()) ||
+            MaxDbPlatform.DATABASENAME.equals(getPlatform().getName()))
         {
                 // Some DBs ignore that the type is CHAR(8) and trim the value
             assertEquals("text", avalue);
@@ -1203,6 +1255,11 @@
      */
     public void testAddAndInsertUniqueIndexAndMultipleColumns()
     {
+        if (!getPlatformInfo().isIndicesSupported())
+        {
+            return;
+        }
+
         final String model1Xml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n"+
             "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='roundtriptest'>\n"+
@@ -1241,6 +1298,11 @@
      */
     public void testInsertColumnIntoNonUniqueIndex()
     {
+        if (!getPlatformInfo().isIndicesSupported())
+        {
+            return;
+        }
+
         final String model1Xml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n"+
             "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='roundtriptest'>\n"+
@@ -1286,7 +1348,8 @@
      */
     public void testInsertAutoIncrementColumnIntoNonUniqueIndex()
     {
-        if (!getPlatformInfo().isNonPrimaryKeyIdentityColumnsSupported())
+        if (!getPlatformInfo().isNonPrimaryKeyIdentityColumnsSupported() ||
+            !getPlatformInfo().isIndicesSupported())
         {
             return;
         }
@@ -1336,6 +1399,11 @@
      */
     public void testInsertRequiredColumnIntoNonUniqueIndex()
     {
+        if (!getPlatformInfo().isIndicesSupported())
+        {
+            return;
+        }
+
         final String model1Xml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n"+
             "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='roundtriptest'>\n"+
@@ -1378,6 +1446,11 @@
      */
     public void testInsertColumnWithDefaultIntoNonUniqueIndex()
     {
+        if (!getPlatformInfo().isIndicesSupported())
+        {
+            return;
+        }
+
         final String model1Xml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n"+
             "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='roundtriptest'>\n"+
@@ -1423,7 +1496,8 @@
      */
     public void testInsertRequiredAutoIncrementColumnIntoNonUniqueIndex()
     {
-        if (!getPlatformInfo().isNonPrimaryKeyIdentityColumnsSupported())
+        if (!getPlatformInfo().isNonPrimaryKeyIdentityColumnsSupported() ||
+            !getPlatformInfo().isIndicesSupported())
         {
             return;
         }
@@ -1473,6 +1547,11 @@
      */
     public void testInsertRequiredColumnWithDefaultIntoNonUniqueIndex()
     {
+        if (!getPlatformInfo().isIndicesSupported())
+        {
+            return;
+        }
+
         final String model1Xml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n"+
             "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='roundtriptest'>\n"+
@@ -1513,7 +1592,8 @@
         assertEquals(new Integer(2),  beans.get(0), "avalue1");
         if (MySqlPlatform.DATABASENAME.equals(getPlatform().getName()) ||
             MySql50Platform.DATABASENAME.equals(getPlatform().getName()) ||
-            HsqlDbPlatform.DATABASENAME.equals(getPlatform().getName()))
+            HsqlDbPlatform.DATABASENAME.equals(getPlatform().getName()) ||
+            MaxDbPlatform.DATABASENAME.equals(getPlatform().getName()))
         {
             // Some DBs ignore that the type is CHAR(8) and trim the value
             assertEquals("text", avalue2);
@@ -1529,6 +1609,11 @@
      */
     public void testAddAndInsertMultipleColumnsIntoNonUniqueIndex()
     {
+        if (!getPlatformInfo().isIndicesSupported())
+        {
+            return;
+        }
+
         final String model1Xml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n"+
             "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='roundtriptest'>\n"+
@@ -1573,6 +1658,11 @@
      */
     public void testInsertColumnIntoUniqueIndex()
     {
+        if (!getPlatformInfo().isIndicesSupported())
+        {
+            return;
+        }
+
         final String model1Xml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n"+
             "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='roundtriptest'>\n"+
@@ -1618,7 +1708,8 @@
      */
     public void testInsertAutoIncrementColumnIntoUniqueIndex()
     {
-        if (!getPlatformInfo().isNonPrimaryKeyIdentityColumnsSupported())
+        if (!getPlatformInfo().isNonPrimaryKeyIdentityColumnsSupported() ||
+            !getPlatformInfo().isIndicesSupported())
         {
             return;
         }
@@ -1668,6 +1759,11 @@
      */
     public void testInsertRequiredColumnIntoUniqueIndex()
     {
+        if (!getPlatformInfo().isIndicesSupported())
+        {
+            return;
+        }
+
         final String model1Xml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n"+
             "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='roundtriptest'>\n"+
@@ -1710,6 +1806,11 @@
      */
     public void testInsertColumnWithDefaultIntoUniqueIndex()
     {
+        if (!getPlatformInfo().isIndicesSupported())
+        {
+            return;
+        }
+
         final String model1Xml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n"+
             "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='roundtriptest'>\n"+
@@ -1755,7 +1856,8 @@
      */
     public void testInsertRequiredAutoIncrementColumnIntoUniqueIndex()
     {
-        if (!getPlatformInfo().isNonPrimaryKeyIdentityColumnsSupported())
+        if (!getPlatformInfo().isNonPrimaryKeyIdentityColumnsSupported() ||
+            !getPlatformInfo().isIndicesSupported())
         {
             return;
         }
@@ -1805,6 +1907,11 @@
      */
     public void testInsertRequiredColumnWithDefaultIntoUniqueIndex()
     {
+        if (!getPlatformInfo().isIndicesSupported())
+        {
+            return;
+        }
+
         final String model1Xml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n"+
             "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='roundtriptest'>\n"+
@@ -1845,7 +1952,8 @@
         assertEquals(new Integer(2), beans.get(0), "avalue1");
         if (MySqlPlatform.DATABASENAME.equals(getPlatform().getName()) ||
             MySql50Platform.DATABASENAME.equals(getPlatform().getName()) ||
-            HsqlDbPlatform.DATABASENAME.equals(getPlatform().getName()))
+            HsqlDbPlatform.DATABASENAME.equals(getPlatform().getName()) ||
+            MaxDbPlatform.DATABASENAME.equals(getPlatform().getName()))
         {
                 // Some DBs ignore that the type is CHAR(8) and trim the value
             assertEquals("text", avalue2);
@@ -1861,6 +1969,11 @@
      */
     public void testAddAndInsertMultipleColumnsIntoUniqueIndex()
     {
+        if (!getPlatformInfo().isIndicesSupported())
+        {
+            return;
+        }
+
         final String model1Xml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n"+
             "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='roundtriptest'>\n"+
@@ -2197,7 +2310,8 @@
         assertEquals(new Integer(1), beans2.get(0), "pk");
         if (MySqlPlatform.DATABASENAME.equals(getPlatform().getName()) ||
             MySql50Platform.DATABASENAME.equals(getPlatform().getName()) ||
-            HsqlDbPlatform.DATABASENAME.equals(getPlatform().getName()))
+            HsqlDbPlatform.DATABASENAME.equals(getPlatform().getName()) ||
+            MaxDbPlatform.DATABASENAME.equals(getPlatform().getName()))
         {
                 // Some DBs ignore that the type is CHAR(8) and trim the value
             assertEquals("text", pk1);
@@ -2777,7 +2891,8 @@
         assertEquals(new Integer(1), beans2.get(0), "avalue1");
         if (MySqlPlatform.DATABASENAME.equals(getPlatform().getName()) ||
             MySql50Platform.DATABASENAME.equals(getPlatform().getName()) ||
-            HsqlDbPlatform.DATABASENAME.equals(getPlatform().getName()))
+            HsqlDbPlatform.DATABASENAME.equals(getPlatform().getName()) ||
+            MaxDbPlatform.DATABASENAME.equals(getPlatform().getName()))
         {
                 // Some DBs ignore that the type is CHAR(8) and trim the value
             assertEquals("text", pk2);

Modified: db/ddlutils/trunk/src/test/java/org/apache/ddlutils/platform/TestMySql50Platform.java
URL: http://svn.apache.org/viewvc/db/ddlutils/trunk/src/test/java/org/apache/ddlutils/platform/TestMySql50Platform.java?rev=893918&r1=893917&r2=893918&view=diff
==============================================================================
--- db/ddlutils/trunk/src/test/java/org/apache/ddlutils/platform/TestMySql50Platform.java (original)
+++ db/ddlutils/trunk/src/test/java/org/apache/ddlutils/platform/TestMySql50Platform.java Sat Dec 26 00:58:26 2009
@@ -151,8 +151,8 @@
             "    `COL_FK` INTEGER NOT NULL,\n"+
             "    PRIMARY KEY (`COL_PK`)\n"+
             ");\n"+
-            "ALTER TABLE `table2` ADD CONSTRAINT `table2_FK_COL_FK_1_COL_FK_2_table1` FOREIGN KEY (`COL_FK_1`, `COL_FK_2`) REFERENCES `table1` (`COL_PK_2`, `COL_PK_1`);\n"+
-            "ALTER TABLE `table3` ADD CONSTRAINT `testfk` FOREIGN KEY (`COL_FK`) REFERENCES `table2` (`COL_PK`);\n",
+            "ALTER TABLE `table2` ADD CONSTRAINT `table2_FK_COL_FK_1_COL_FK_2_table1` FOREIGN KEY (`COL_FK_1`, `COL_FK_2`) REFERENCES `table1` (`COL_PK_2`, `COL_PK_1`) ON DELETE NO ACTION ON UPDATE NO ACTION;\n"+
+            "ALTER TABLE `table3` ADD CONSTRAINT `testfk` FOREIGN KEY (`COL_FK`) REFERENCES `table2` (`COL_PK`) ON DELETE NO ACTION ON UPDATE NO ACTION;\n",
             getTableConstraintTestDatabaseCreationSql());
     }
 

Modified: db/ddlutils/trunk/src/test/java/org/apache/ddlutils/platform/TestMySqlPlatform.java
URL: http://svn.apache.org/viewvc/db/ddlutils/trunk/src/test/java/org/apache/ddlutils/platform/TestMySqlPlatform.java?rev=893918&r1=893917&r2=893918&view=diff
==============================================================================
--- db/ddlutils/trunk/src/test/java/org/apache/ddlutils/platform/TestMySqlPlatform.java (original)
+++ db/ddlutils/trunk/src/test/java/org/apache/ddlutils/platform/TestMySqlPlatform.java Sat Dec 26 00:58:26 2009
@@ -153,8 +153,8 @@
             "    `COL_FK` INTEGER NOT NULL,\n"+
             "    PRIMARY KEY (`COL_PK`)\n"+
             ");\n"+
-            "ALTER TABLE `table2` ADD CONSTRAINT `table2_FK_COL_FK_1_COL_FK_2_table1` FOREIGN KEY (`COL_FK_1`, `COL_FK_2`) REFERENCES `table1` (`COL_PK_2`, `COL_PK_1`);\n"+
-            "ALTER TABLE `table3` ADD CONSTRAINT `testfk` FOREIGN KEY (`COL_FK`) REFERENCES `table2` (`COL_PK`);\n",
+            "ALTER TABLE `table2` ADD CONSTRAINT `table2_FK_COL_FK_1_COL_FK_2_table1` FOREIGN KEY (`COL_FK_1`, `COL_FK_2`) REFERENCES `table1` (`COL_PK_2`, `COL_PK_1`) ON DELETE NO ACTION ON UPDATE NO ACTION;\n"+
+            "ALTER TABLE `table3` ADD CONSTRAINT `testfk` FOREIGN KEY (`COL_FK`) REFERENCES `table2` (`COL_PK`) ON DELETE NO ACTION ON UPDATE NO ACTION;\n",
             getTableConstraintTestDatabaseCreationSql());
     }
 

Modified: db/ddlutils/trunk/src/test/java/org/apache/ddlutils/task/TestWriteDataToDatabaseCommand.java
URL: http://svn.apache.org/viewvc/db/ddlutils/trunk/src/test/java/org/apache/ddlutils/task/TestWriteDataToDatabaseCommand.java?rev=893918&r1=893917&r2=893918&view=diff
==============================================================================
--- db/ddlutils/trunk/src/test/java/org/apache/ddlutils/task/TestWriteDataToDatabaseCommand.java (original)
+++ db/ddlutils/trunk/src/test/java/org/apache/ddlutils/task/TestWriteDataToDatabaseCommand.java Sat Dec 26 00:58:26 2009
@@ -1,5 +1,24 @@
 package org.apache.ddlutils.task;
 
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
 import java.io.File;
 import java.io.FileWriter;
 import java.io.IOException;
@@ -76,6 +95,9 @@
         }
     }
 
+    /**
+     * Basic test that creates a schema and puts some data into it.
+     */
     public void testSimple() throws Exception
     {
         final String modelXml = 
@@ -109,6 +131,9 @@
         assertEquals(new Integer(3), beans.get(2), "avalue");
     }
 
+    /**
+     * Tests data insertion in batch mode.
+     */
     public void testBatchMode() throws Exception
     {
         final String modelXml = 

Modified: db/ddlutils/trunk/src/test/java/org/apache/ddlutils/task/TestWriteDataToFileCommand.java
URL: http://svn.apache.org/viewvc/db/ddlutils/trunk/src/test/java/org/apache/ddlutils/task/TestWriteDataToFileCommand.java?rev=893918&r1=893917&r2=893918&view=diff
==============================================================================
--- db/ddlutils/trunk/src/test/java/org/apache/ddlutils/task/TestWriteDataToFileCommand.java (original)
+++ db/ddlutils/trunk/src/test/java/org/apache/ddlutils/task/TestWriteDataToFileCommand.java Sat Dec 26 00:58:26 2009
@@ -1,5 +1,24 @@
 package org.apache.ddlutils.task;
 
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
 import java.io.File;
 import java.io.IOException;
 import java.util.ArrayList;

Modified: db/ddlutils/trunk/src/test/java/org/apache/ddlutils/task/TestWriteSchemaToFileCommand.java
URL: http://svn.apache.org/viewvc/db/ddlutils/trunk/src/test/java/org/apache/ddlutils/task/TestWriteSchemaToFileCommand.java?rev=893918&r1=893917&r2=893918&view=diff
==============================================================================
--- db/ddlutils/trunk/src/test/java/org/apache/ddlutils/task/TestWriteSchemaToFileCommand.java (original)
+++ db/ddlutils/trunk/src/test/java/org/apache/ddlutils/task/TestWriteSchemaToFileCommand.java Sat Dec 26 00:58:26 2009
@@ -1,5 +1,24 @@
 package org.apache.ddlutils.task;
 
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
 import java.io.File;
 import java.io.IOException;