db-ddlutils-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From to...@apache.org
Subject svn commit: r634933 - /db/ddlutils/trunk/src/test/org/apache/ddlutils/io/TestMisc.java
Date Sat, 08 Mar 2008 11:39:59 GMT
Author: tomdz
Date: Sat Mar  8 03:39:51 2008
New Revision: 634933

URL: http://svn.apache.org/viewvc?rev=634933&view=rev
Log:
Added test for DDLUTILS-178

Modified:
    db/ddlutils/trunk/src/test/org/apache/ddlutils/io/TestMisc.java

Modified: db/ddlutils/trunk/src/test/org/apache/ddlutils/io/TestMisc.java
URL: http://svn.apache.org/viewvc/db/ddlutils/trunk/src/test/org/apache/ddlutils/io/TestMisc.java?rev=634933&r1=634932&r2=634933&view=diff
==============================================================================
--- db/ddlutils/trunk/src/test/org/apache/ddlutils/io/TestMisc.java (original)
+++ db/ddlutils/trunk/src/test/org/apache/ddlutils/io/TestMisc.java Sat Mar  8 03:39:51 2008
@@ -1039,4 +1039,33 @@
         assertEquals(2, getRows("G").size());
     }
 
+    /**
+     * Test for DDLUTILS-178.
+     */
+    public void testDdlUtils178() throws Exception
+    {
+        if (!getPlatformInfo().isIndicesSupported())
+        {
+            return;
+        }
+
+        final String modelXml = 
+            "<?xml version='1.0' encoding='ISO-8859-1'?>\n"+
+            "  <database name='roundtriptest'>\n"+
+            "    <table name='ad_sequence_no'>\n"+
+            "      <column name='ad_sequence_id' required='true' type='NUMERIC' size='10'/>\n"+
+            "      <column name='year' required='true' type='VARCHAR' size='4' default='0000'/>\n"+
+            "      <column name='ad_client_id' required='true' type='NUMERIC' size='10'/>\n"+
+            "      <unique name='ad_sequence_no_key'>\n"+
+            "        <unique-column name='ad_sequence_id'/>\n"+
+            "        <unique-column name='year'/>\n"+
+            "      </unique>\n"+
+            "    </table>\n"+
+            "</database>";
+
+        createDatabase(modelXml);
+
+        assertEquals(getAdjustedModel(),
+                     readModelFromDatabase("roundtriptest"));
+    }
 }



Mime
View raw message