db-ddlutils-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From to...@apache.org
Subject svn commit: r232530 [4/4] - in /db/ddlutils/trunk/src: java/org/apache/ddlutils/ java/org/apache/ddlutils/builder/ java/org/apache/ddlutils/dynabean/ java/org/apache/ddlutils/io/ java/org/apache/ddlutils/model/ java/org/apache/ddlutils/platform/ java/o...
Date Sat, 13 Aug 2005 21:39:40 GMT
Copied: db/ddlutils/trunk/src/test/org/apache/ddlutils/builder/TestAxionPlatform.java (from
r226549, db/ddlutils/trunk/src/test/org/apache/ddlutils/builder/TestAxionBuilder.java)
URL: http://svn.apache.org/viewcvs/db/ddlutils/trunk/src/test/org/apache/ddlutils/builder/TestAxionPlatform.java?p2=db/ddlutils/trunk/src/test/org/apache/ddlutils/builder/TestAxionPlatform.java&p1=db/ddlutils/trunk/src/test/org/apache/ddlutils/builder/TestAxionBuilder.java&r1=226549&r2=232530&rev=232530&view=diff
==============================================================================
--- db/ddlutils/trunk/src/test/org/apache/ddlutils/builder/TestAxionBuilder.java (original)
+++ db/ddlutils/trunk/src/test/org/apache/ddlutils/builder/TestAxionPlatform.java Sat Aug
13 14:36:44 2005
@@ -16,22 +16,23 @@
  * limitations under the License.
  */
 
-import org.apache.ddlutils.TestBuilderBase;
-import org.apache.ddlutils.model.Database;
+import org.apache.ddlutils.TestPlatformBase;
+import org.apache.ddlutils.platform.AxionPlatform;
 
 /**
  * Tests the Axion builder.
  * 
  * @author <a href="mailto:tomdz@apache.org">Thomas Dudziak</a>
+ * @version $Revision: 231110 $
  */
-public class TestAxionBuilder extends TestBuilderBase
+public class TestAxionPlatform extends TestPlatformBase
 {
     /* (non-Javadoc)
-     * @see org.apache.ddlutils.builder.TestBuilderBase#getDatabaseName()
+     * @see org.apache.ddlutils.builder.TestPlatformBase#getDatabaseName()
      */
     protected String getDatabaseName()
     {
-        return "Axion";
+        return AxionPlatform.DATABASENAME;
     }
 
     /**
@@ -39,12 +40,6 @@
      */
     public void testColumnTypes() throws Exception
     {
-        Database testDb = parseDatabaseFromString(COLUMN_TEST_SCHEMA);
-
-        // we're turning the comment creation off to make testing easier
-        getBuilder().setCommentsSupported(false);
-        getBuilder().createDatabase(testDb);
-
         assertEqualsIgnoringWhitespaces(
             "DROP TABLE IF EXISTS coltype;\n"+
             "CREATE TABLE coltype\n"+
@@ -81,6 +76,6 @@
             "    COL_VARBINARY       VARBINARY(15),\n"+
             "    COL_VARCHAR         VARCHAR(15)\n"+
             ");\n",
-            getBuilderOutput());
+            createTestDatabase());
     }
 }

Copied: db/ddlutils/trunk/src/test/org/apache/ddlutils/builder/TestCloudscapePlatform.java
(from r226549, db/ddlutils/trunk/src/test/org/apache/ddlutils/builder/TestCloudscapeBuilder.java)
URL: http://svn.apache.org/viewcvs/db/ddlutils/trunk/src/test/org/apache/ddlutils/builder/TestCloudscapePlatform.java?p2=db/ddlutils/trunk/src/test/org/apache/ddlutils/builder/TestCloudscapePlatform.java&p1=db/ddlutils/trunk/src/test/org/apache/ddlutils/builder/TestCloudscapeBuilder.java&r1=226549&r2=232530&rev=232530&view=diff
==============================================================================
--- db/ddlutils/trunk/src/test/org/apache/ddlutils/builder/TestCloudscapeBuilder.java (original)
+++ db/ddlutils/trunk/src/test/org/apache/ddlutils/builder/TestCloudscapePlatform.java Sat
Aug 13 14:36:44 2005
@@ -16,22 +16,23 @@
  * limitations under the License.
  */
 
-import org.apache.ddlutils.TestBuilderBase;
-import org.apache.ddlutils.model.Database;
+import org.apache.ddlutils.TestPlatformBase;
+import org.apache.ddlutils.platform.CloudscapePlatform;
 
 /**
- * Tests the Cloudscape/Derby builder.
+ * Tests the Cloudscape platform.
  * 
  * @author <a href="mailto:tomdz@apache.org">Thomas Dudziak</a>
- */
-public class TestCloudscapeBuilder extends TestBuilderBase
+  * @version $Revision: 231110 $
+*/
+public class TestCloudscapePlatform extends TestPlatformBase
 {
     /* (non-Javadoc)
-     * @see org.apache.ddlutils.builder.TestBuilderBase#getDatabaseName()
+     * @see org.apache.ddlutils.builder.TestPlatformBase#getDatabaseName()
      */
     protected String getDatabaseName()
     {
-        return CloudscapeBuilder.DATABASENAME;
+        return CloudscapePlatform.DATABASENAME;
     }
 
     /**
@@ -39,12 +40,6 @@
      */
     public void testColumnTypes() throws Exception
     {
-        Database testDb = parseDatabaseFromString(COLUMN_TEST_SCHEMA);
-
-        // we're turning the comment creation off to make testing easier
-        getBuilder().setCommentsSupported(false);
-        getBuilder().createDatabase(testDb);
-
         assertEqualsIgnoringWhitespaces(
             "DROP TABLE coltype;\n"+
             "CREATE TABLE coltype\n"+
@@ -81,6 +76,6 @@
             "    COL_VARBINARY       VARCHAR(15) FOR BIT DATA,\n"+
             "    COL_VARCHAR         VARCHAR(15)\n"+
             ");\n",
-            getBuilderOutput());
+            createTestDatabase());
     }
 }

Copied: db/ddlutils/trunk/src/test/org/apache/ddlutils/builder/TestDB2Platform.java (from
r226549, db/ddlutils/trunk/src/test/org/apache/ddlutils/builder/TestDB2Builder.java)
URL: http://svn.apache.org/viewcvs/db/ddlutils/trunk/src/test/org/apache/ddlutils/builder/TestDB2Platform.java?p2=db/ddlutils/trunk/src/test/org/apache/ddlutils/builder/TestDB2Platform.java&p1=db/ddlutils/trunk/src/test/org/apache/ddlutils/builder/TestDB2Builder.java&r1=226549&r2=232530&rev=232530&view=diff
==============================================================================
--- db/ddlutils/trunk/src/test/org/apache/ddlutils/builder/TestDB2Builder.java (original)
+++ db/ddlutils/trunk/src/test/org/apache/ddlutils/builder/TestDB2Platform.java Sat Aug 13
14:36:44 2005
@@ -16,22 +16,23 @@
  * limitations under the License.
  */
 
-import org.apache.ddlutils.TestBuilderBase;
-import org.apache.ddlutils.model.Database;
+import org.apache.ddlutils.TestPlatformBase;
+import org.apache.ddlutils.platform.Db2Platform;
 
 /**
- * Tests the DB2 builder.
+ * Tests the DB2 platform.
  * 
  * @author <a href="mailto:tomdz@apache.org">Thomas Dudziak</a>
+ * @version $Revision: 231110 $
  */
-public class TestDB2Builder extends TestBuilderBase
+public class TestDB2Platform extends TestPlatformBase
 {
     /* (non-Javadoc)
-     * @see org.apache.ddlutils.builder.TestBuilderBase#getDatabaseName()
+     * @see org.apache.ddlutils.builder.TestPlatformBase#getDatabaseName()
      */
     protected String getDatabaseName()
     {
-        return Db2Builder.DATABASENAME;
+        return Db2Platform.DATABASENAME;
     }
 
     /**
@@ -39,12 +40,6 @@
      */
     public void testColumnTypes() throws Exception
     {
-        Database testDb = parseDatabaseFromString(COLUMN_TEST_SCHEMA);
-
-        // we're turning the comment creation off to make testing easier
-        getBuilder().setCommentsSupported(false);
-        getBuilder().createDatabase(testDb);
-
         assertEqualsIgnoringWhitespaces(
             "DROP TABLE coltype;\n"+
             "DROP SEQUENCE IF EXISTS coltype.SequenceName;\n"+
@@ -82,6 +77,6 @@
             "    COL_VARBINARY     VARCHAR(15) FOR BIT DATA,\n"+
             "    COL_VARCHAR       VARCHAR(15)\n"+
             ");\n",
-            getBuilderOutput());
+            createTestDatabase());
     }
 }

Copied: db/ddlutils/trunk/src/test/org/apache/ddlutils/builder/TestDerbyPlatform.java (from
r226549, db/ddlutils/trunk/src/test/org/apache/ddlutils/builder/TestDerbyBuilder.java)
URL: http://svn.apache.org/viewcvs/db/ddlutils/trunk/src/test/org/apache/ddlutils/builder/TestDerbyPlatform.java?p2=db/ddlutils/trunk/src/test/org/apache/ddlutils/builder/TestDerbyPlatform.java&p1=db/ddlutils/trunk/src/test/org/apache/ddlutils/builder/TestDerbyBuilder.java&r1=226549&r2=232530&rev=232530&view=diff
==============================================================================
--- db/ddlutils/trunk/src/test/org/apache/ddlutils/builder/TestDerbyBuilder.java (original)
+++ db/ddlutils/trunk/src/test/org/apache/ddlutils/builder/TestDerbyPlatform.java Sat Aug
13 14:36:44 2005
@@ -16,22 +16,23 @@
  * limitations under the License.
  */
 
-import org.apache.ddlutils.TestBuilderBase;
-import org.apache.ddlutils.model.Database;
+import org.apache.ddlutils.TestPlatformBase;
+import org.apache.ddlutils.platform.DerbyPlatform;
 
 /**
- * Tests the Derby builder.
+ * Tests the Derby platform.
  * 
  * @author <a href="mailto:tomdz@apache.org">Thomas Dudziak</a>
+ * @version $Revision: 231110 $
  */
-public class TestDerbyBuilder extends TestBuilderBase
+public class TestDerbyPlatform extends TestPlatformBase
 {
     /* (non-Javadoc)
-     * @see org.apache.ddlutils.builder.TestBuilderBase#getDatabaseName()
+     * @see org.apache.ddlutils.builder.TestPlatformBase#getDatabaseName()
      */
     protected String getDatabaseName()
     {
-        return DerbyBuilder.DATABASENAME;
+        return DerbyPlatform.DATABASENAME;
     }
 
     /**
@@ -39,12 +40,6 @@
      */
     public void testColumnTypes() throws Exception
     {
-        Database testDb = parseDatabaseFromString(COLUMN_TEST_SCHEMA);
-
-        // we're turning the comment creation off to make testing easier
-        getBuilder().setCommentsSupported(false);
-        getBuilder().createDatabase(testDb);
-
         assertEqualsIgnoringWhitespaces(
             "DROP TABLE coltype;\n"+
             "CREATE TABLE coltype\n"+
@@ -81,6 +76,6 @@
             "    COL_VARBINARY       VARCHAR(15) FOR BIT DATA,\n"+
             "    COL_VARCHAR         VARCHAR(15)\n"+
             ");\n",
-            getBuilderOutput());
+            createTestDatabase());
     }
 }

Copied: db/ddlutils/trunk/src/test/org/apache/ddlutils/builder/TestFirebirdPlatform.java (from
r226549, db/ddlutils/trunk/src/test/org/apache/ddlutils/builder/TestFirebirdBuilder.java)
URL: http://svn.apache.org/viewcvs/db/ddlutils/trunk/src/test/org/apache/ddlutils/builder/TestFirebirdPlatform.java?p2=db/ddlutils/trunk/src/test/org/apache/ddlutils/builder/TestFirebirdPlatform.java&p1=db/ddlutils/trunk/src/test/org/apache/ddlutils/builder/TestFirebirdBuilder.java&r1=226549&r2=232530&rev=232530&view=diff
==============================================================================
--- db/ddlutils/trunk/src/test/org/apache/ddlutils/builder/TestFirebirdBuilder.java (original)
+++ db/ddlutils/trunk/src/test/org/apache/ddlutils/builder/TestFirebirdPlatform.java Sat Aug
13 14:36:44 2005
@@ -16,20 +16,23 @@
  * limitations under the License.
  */
 
-import org.apache.ddlutils.TestBuilderBase;
-import org.apache.ddlutils.model.Database;
+import org.apache.ddlutils.TestPlatformBase;
+import org.apache.ddlutils.platform.FirebirdPlatform;
 
 /**
- * Tests the Firebird builder.
+ * Tests the Firebird platform.
+ * 
+ * @author <a href="mailto:tomdz@apache.org">Thomas Dudziak</a>
+ * @version $Revision: 231110 $
  */
-public class TestFirebirdBuilder extends TestBuilderBase
+public class TestFirebirdPlatform extends TestPlatformBase
 {
     /* (non-Javadoc)
-     * @see org.apache.ddlutils.builder.TestBuilderBase#getDatabaseName()
+     * @see org.apache.ddlutils.builder.TestPlatformBase#getDatabaseName()
      */
     protected String getDatabaseName()
     {
-        return FirebirdBuilder.DATABASENAME;
+        return FirebirdPlatform.DATABASENAME;
     }
 
     /**
@@ -37,12 +40,6 @@
      */
     public void testColumnTypes() throws Exception
     {
-        Database testDb = parseDatabaseFromString(COLUMN_TEST_SCHEMA);
-
-        // we're turning the comment creation off to make testing easier
-        getBuilder().setCommentsSupported(false);
-        getBuilder().createDatabase(testDb);
-
         assertEqualsIgnoringWhitespaces(
             "DROP TABLE coltype;\n"+
             "COMMIT;\n"+
@@ -81,6 +78,6 @@
             "    COL_VARCHAR         VARCHAR(15)\n"+
             ");\n"+
             "COMMIT;\n",
-            getBuilderOutput());
+            createTestDatabase());
     }
 }

Copied: db/ddlutils/trunk/src/test/org/apache/ddlutils/builder/TestHsqlDbPlatform.java (from
r226549, db/ddlutils/trunk/src/test/org/apache/ddlutils/builder/TestHsqlDbBuilder.java)
URL: http://svn.apache.org/viewcvs/db/ddlutils/trunk/src/test/org/apache/ddlutils/builder/TestHsqlDbPlatform.java?p2=db/ddlutils/trunk/src/test/org/apache/ddlutils/builder/TestHsqlDbPlatform.java&p1=db/ddlutils/trunk/src/test/org/apache/ddlutils/builder/TestHsqlDbBuilder.java&r1=226549&r2=232530&rev=232530&view=diff
==============================================================================
--- db/ddlutils/trunk/src/test/org/apache/ddlutils/builder/TestHsqlDbBuilder.java (original)
+++ db/ddlutils/trunk/src/test/org/apache/ddlutils/builder/TestHsqlDbPlatform.java Sat Aug
13 14:36:44 2005
@@ -16,24 +16,25 @@
  * limitations under the License.
  */
 
-import org.apache.ddlutils.TestBuilderBase;
-import org.apache.ddlutils.model.Database;
+import org.apache.ddlutils.TestPlatformBase;
+import org.apache.ddlutils.platform.HsqlDbPlatform;
 
 /**
- * Tests the Hsqldb builder.
+ * Tests the Hsqldb platform.
  * 
  * @author David Carlson
  * @author <a href="mailto:tomdz@apache.org">Thomas Dudziak</a>
+ * @version $Revision: 231110 $
  */
-public class TestHsqlDbBuilder extends TestBuilderBase
+public class TestHsqlDbPlatform extends TestPlatformBase
 {
     /*
      * (non-Javadoc)
-     * @see org.apache.ddlutils.builder.TestBuilderBase#getDatabaseName()
+     * @see org.apache.ddlutils.builder.TestPlatformBase#getDatabaseName()
      */
     protected String getDatabaseName()
     {
-        return HsqlDbBuilder.DATABASENAME;
+        return HsqlDbPlatform.DATABASENAME;
     }
 
     /**
@@ -41,47 +42,42 @@
      */
     public void testColumnTypes() throws Exception
     {
-        Database testDb = parseDatabaseFromString(COLUMN_TEST_SCHEMA);
-
-        // we're turning the comment creation off to make testing easier
-        getBuilder().setCommentsSupported(false);
-        getBuilder().createDatabase(testDb);
-
-        assertEqualsIgnoringWhitespaces("DROP TABLE coltype IF EXISTS;\n" + //
-                "CREATE TABLE coltype\n" + //
-                "(\n" + //
-                "    COL_ARRAY           LONGVARBINARY,\n"+
-                "    COL_BIGINT          BIGINT,\n"+
-                "    COL_BINARY          BINARY,\n"+
-                "    COL_BIT             BIT,\n"+
-                "    COL_BLOB            LONGVARBINARY,\n"+
-                "    COL_BOOLEAN         BIT,\n"+
-                "    COL_CHAR            CHAR(15),\n"+
-                "    COL_CLOB            LONGVARCHAR,\n"+
-                "    COL_DATALINK        LONGVARBINARY,\n"+
-                "    COL_DATE            DATE,\n"+
-                "    COL_DECIMAL         DECIMAL(15,3),\n"+
-                "    COL_DECIMAL_NOSCALE DECIMAL(15,0),\n"+
-                "    COL_DISTINCT        LONGVARBINARY,\n"+
-                "    COL_DOUBLE          DOUBLE,\n"+
-                "    COL_FLOAT           DOUBLE,\n"+
-                "    COL_INTEGER         INTEGER,\n"+
-                "    COL_JAVA_OBJECT     OBJECT,\n"+
-                "    COL_LONGVARBINARY   LONGVARBINARY,\n"+
-                "    COL_LONGVARCHAR     LONGVARCHAR,\n"+
-                "    COL_NULL            LONGVARBINARY,\n"+
-                "    COL_NUMERIC         NUMERIC(15,0),\n"+
-                "    COL_OTHER           OTHER,\n"+
-                "    COL_REAL            REAL,\n"+
-                "    COL_REF             LONGVARBINARY,\n"+
-                "    COL_SMALLINT        SMALLINT,\n"+
-                "    COL_STRUCT          LONGVARBINARY,\n"+
-                "    COL_TIME            TIME,\n"+
-                "    COL_TIMESTAMP       TIMESTAMP,\n"+
-                "    COL_TINYINT         TINYINT,\n"+
-                "    COL_VARBINARY       VARBINARY(15),\n"+
-                "    COL_VARCHAR         VARCHAR(15)\n"+
-                ");\n",
-                getBuilderOutput());
+        assertEqualsIgnoringWhitespaces(
+            "DROP TABLE coltype IF EXISTS;\n" + //
+            "CREATE TABLE coltype\n" + //
+            "(\n" + //
+            "    COL_ARRAY           LONGVARBINARY,\n"+
+            "    COL_BIGINT          BIGINT,\n"+
+            "    COL_BINARY          BINARY,\n"+
+            "    COL_BIT             BIT,\n"+
+            "    COL_BLOB            LONGVARBINARY,\n"+
+            "    COL_BOOLEAN         BIT,\n"+
+            "    COL_CHAR            CHAR(15),\n"+
+            "    COL_CLOB            LONGVARCHAR,\n"+
+            "    COL_DATALINK        LONGVARBINARY,\n"+
+            "    COL_DATE            DATE,\n"+
+            "    COL_DECIMAL         DECIMAL(15,3),\n"+
+            "    COL_DECIMAL_NOSCALE DECIMAL(15,0),\n"+
+            "    COL_DISTINCT        LONGVARBINARY,\n"+
+            "    COL_DOUBLE          DOUBLE,\n"+
+            "    COL_FLOAT           DOUBLE,\n"+
+            "    COL_INTEGER         INTEGER,\n"+
+            "    COL_JAVA_OBJECT     OBJECT,\n"+
+            "    COL_LONGVARBINARY   LONGVARBINARY,\n"+
+            "    COL_LONGVARCHAR     LONGVARCHAR,\n"+
+            "    COL_NULL            LONGVARBINARY,\n"+
+            "    COL_NUMERIC         NUMERIC(15,0),\n"+
+            "    COL_OTHER           OTHER,\n"+
+            "    COL_REAL            REAL,\n"+
+            "    COL_REF             LONGVARBINARY,\n"+
+            "    COL_SMALLINT        SMALLINT,\n"+
+            "    COL_STRUCT          LONGVARBINARY,\n"+
+            "    COL_TIME            TIME,\n"+
+            "    COL_TIMESTAMP       TIMESTAMP,\n"+
+            "    COL_TINYINT         TINYINT,\n"+
+            "    COL_VARBINARY       VARBINARY(15),\n"+
+            "    COL_VARCHAR         VARCHAR(15)\n"+
+            ");\n",
+            createTestDatabase());
     }
 }

Copied: db/ddlutils/trunk/src/test/org/apache/ddlutils/builder/TestInterbasePlatform.java
(from r226549, db/ddlutils/trunk/src/test/org/apache/ddlutils/builder/TestInterbaseBuilder.java)
URL: http://svn.apache.org/viewcvs/db/ddlutils/trunk/src/test/org/apache/ddlutils/builder/TestInterbasePlatform.java?p2=db/ddlutils/trunk/src/test/org/apache/ddlutils/builder/TestInterbasePlatform.java&p1=db/ddlutils/trunk/src/test/org/apache/ddlutils/builder/TestInterbaseBuilder.java&r1=226549&r2=232530&rev=232530&view=diff
==============================================================================
--- db/ddlutils/trunk/src/test/org/apache/ddlutils/builder/TestInterbaseBuilder.java (original)
+++ db/ddlutils/trunk/src/test/org/apache/ddlutils/builder/TestInterbasePlatform.java Sat
Aug 13 14:36:44 2005
@@ -16,20 +16,23 @@
  * limitations under the License.
  */
 
-import org.apache.ddlutils.TestBuilderBase;
-import org.apache.ddlutils.model.Database;
+import org.apache.ddlutils.TestPlatformBase;
+import org.apache.ddlutils.platform.InterbasePlatform;
 
 /**
- * Tests the Interbase builder.
+ * Tests the Interbase platform.
+ * 
+ * @author <a href="mailto:tomdz@apache.org">Thomas Dudziak</a>
+ * @version $Revision: 231110 $
  */
-public class TestInterbaseBuilder extends TestBuilderBase
+public class TestInterbasePlatform extends TestPlatformBase
 {
     /* (non-Javadoc)
-     * @see org.apache.ddlutils.builder.TestBuilderBase#getDatabaseName()
+     * @see org.apache.ddlutils.builder.TestPlatformBase#getDatabaseName()
      */
     protected String getDatabaseName()
     {
-        return InterbaseBuilder.DATABASENAME;
+        return InterbasePlatform.DATABASENAME;
     }
 
     /**
@@ -37,12 +40,6 @@
      */
     public void testColumnTypes() throws Exception
     {
-        Database testDb = parseDatabaseFromString(COLUMN_TEST_SCHEMA);
-
-        // we're turning the comment creation off to make testing easier
-        getBuilder().setCommentsSupported(false);
-        getBuilder().createDatabase(testDb);
-
         assertEqualsIgnoringWhitespaces(
             "DROP TABLE coltype;\n"+
             "COMMIT;\n"+
@@ -81,6 +78,6 @@
             "    COL_VARCHAR         VARCHAR(15)\n"+
             ");\n"+
             "COMMIT;\n",
-            getBuilderOutput());
+            createTestDatabase());
     }
 }

Copied: db/ddlutils/trunk/src/test/org/apache/ddlutils/builder/TestMSSqlPlatform.java (from
r226549, db/ddlutils/trunk/src/test/org/apache/ddlutils/builder/TestMSSqlServerBuilder.java)
URL: http://svn.apache.org/viewcvs/db/ddlutils/trunk/src/test/org/apache/ddlutils/builder/TestMSSqlPlatform.java?p2=db/ddlutils/trunk/src/test/org/apache/ddlutils/builder/TestMSSqlPlatform.java&p1=db/ddlutils/trunk/src/test/org/apache/ddlutils/builder/TestMSSqlServerBuilder.java&r1=226549&r2=232530&rev=232530&view=diff
==============================================================================
--- db/ddlutils/trunk/src/test/org/apache/ddlutils/builder/TestMSSqlServerBuilder.java (original)
+++ db/ddlutils/trunk/src/test/org/apache/ddlutils/builder/TestMSSqlPlatform.java Sat Aug
13 14:36:44 2005
@@ -16,20 +16,23 @@
  * limitations under the License.
  */
 
-import org.apache.ddlutils.TestBuilderBase;
-import org.apache.ddlutils.model.Database;
+import org.apache.ddlutils.TestPlatformBase;
+import org.apache.ddlutils.platform.MSSqlPlatform;
 
 /**
- * Tests the Microsoft SQL Server builder.
+ * Tests the Microsoft SQL Server platform.
+ * 
+ * @author <a href="mailto:tomdz@apache.org">Thomas Dudziak</a>
+ * @version $Revision: 231110 $
  */
-public class TestMSSqlServerBuilder extends TestBuilderBase
+public class TestMSSqlPlatform extends TestPlatformBase
 {
     /* (non-Javadoc)
-     * @see org.apache.ddlutils.builder.TestBuilderBase#getDatabaseName()
+     * @see org.apache.ddlutils.builder.TestPlatformBase#getDatabaseName()
      */
     protected String getDatabaseName()
     {
-        return MSSqlBuilder.DATABASENAME;
+        return MSSqlPlatform.DATABASENAME;
     }
 
     /**
@@ -37,12 +40,6 @@
      */
     public void testColumnTypes() throws Exception
     {
-        Database testDb = parseDatabaseFromString(COLUMN_TEST_SCHEMA);
-
-        // we're turning the comment creation off to make testing easier
-        getBuilder().setCommentsSupported(false);
-        getBuilder().createDatabase(testDb);
-
         assertEqualsIgnoringWhitespaces(
             "IF EXISTS (SELECT 1 FROM sysobjects WHERE type = 'U' AND name = 'coltype')\n"+
             "BEGIN\n"+
@@ -102,6 +99,6 @@
             "    COL_VARBINARY       VARBINARY(15),\n"+
             "    COL_VARCHAR         VARCHAR(15)\n"+
             ");\n",
-            getBuilderOutput());
+            createTestDatabase());
     }
 }

Copied: db/ddlutils/trunk/src/test/org/apache/ddlutils/builder/TestMaxDbPlatform.java (from
r226549, db/ddlutils/trunk/src/test/org/apache/ddlutils/builder/TestMaxDbBuilder.java)
URL: http://svn.apache.org/viewcvs/db/ddlutils/trunk/src/test/org/apache/ddlutils/builder/TestMaxDbPlatform.java?p2=db/ddlutils/trunk/src/test/org/apache/ddlutils/builder/TestMaxDbPlatform.java&p1=db/ddlutils/trunk/src/test/org/apache/ddlutils/builder/TestMaxDbBuilder.java&r1=226549&r2=232530&rev=232530&view=diff
==============================================================================
--- db/ddlutils/trunk/src/test/org/apache/ddlutils/builder/TestMaxDbBuilder.java (original)
+++ db/ddlutils/trunk/src/test/org/apache/ddlutils/builder/TestMaxDbPlatform.java Sat Aug
13 14:36:44 2005
@@ -16,20 +16,23 @@
  * limitations under the License.
  */
 
-import org.apache.ddlutils.TestBuilderBase;
-import org.apache.ddlutils.model.Database;
+import org.apache.ddlutils.TestPlatformBase;
+import org.apache.ddlutils.platform.MaxDbPlatform;
 
 /**
- * Tests the MaxDB builder.
+ * Tests the MaxDB platform.
+ * 
+ * @author <a href="mailto:tomdz@apache.org">Thomas Dudziak</a>
+ * @version $Revision: 231110 $
  */
-public class TestMaxDbBuilder extends TestBuilderBase
+public class TestMaxDbPlatform extends TestPlatformBase
 {
     /* (non-Javadoc)
-     * @see org.apache.ddlutils.builder.TestBuilderBase#getDatabaseName()
+     * @see org.apache.ddlutils.builder.TestPlatformBase#getDatabaseName()
      */
     protected String getDatabaseName()
     {
-        return MaxDbBuilder.DATABASENAME;
+        return MaxDbPlatform.DATABASENAME;
     }
 
     /**
@@ -37,12 +40,6 @@
      */
     public void testColumnTypes() throws Exception
     {
-        Database testDb = parseDatabaseFromString(COLUMN_TEST_SCHEMA);
-
-        // we're turning the comment creation off to make testing easier
-        getBuilder().setCommentsSupported(false);
-        getBuilder().createDatabase(testDb);
-
         assertEqualsIgnoringWhitespaces(
             "DROP TABLE coltype CASCADE;\n"+
             "CREATE TABLE coltype\n"+
@@ -79,6 +76,6 @@
             "    COL_VARBINARY       LONG BYTE,\n"+
             "    COL_VARCHAR         VARCHAR(15)\n"+
             ");\n",
-            getBuilderOutput());
+            createTestDatabase());
     }
 }

Copied: db/ddlutils/trunk/src/test/org/apache/ddlutils/builder/TestMcKoiPlatform.java (from
r226549, db/ddlutils/trunk/src/test/org/apache/ddlutils/builder/TestMcKoiBuilder.java)
URL: http://svn.apache.org/viewcvs/db/ddlutils/trunk/src/test/org/apache/ddlutils/builder/TestMcKoiPlatform.java?p2=db/ddlutils/trunk/src/test/org/apache/ddlutils/builder/TestMcKoiPlatform.java&p1=db/ddlutils/trunk/src/test/org/apache/ddlutils/builder/TestMcKoiBuilder.java&r1=226549&r2=232530&rev=232530&view=diff
==============================================================================
--- db/ddlutils/trunk/src/test/org/apache/ddlutils/builder/TestMcKoiBuilder.java (original)
+++ db/ddlutils/trunk/src/test/org/apache/ddlutils/builder/TestMcKoiPlatform.java Sat Aug
13 14:36:44 2005
@@ -16,22 +16,23 @@
  * limitations under the License.
  */
 
-import org.apache.ddlutils.TestBuilderBase;
-import org.apache.ddlutils.model.Database;
+import org.apache.ddlutils.TestPlatformBase;
+import org.apache.ddlutils.platform.MckoiPlatform;
 
 /**
  * Tests the McKoi builder.
  * 
  * @author <a href="mailto:tomdz@apache.org">Thomas Dudziak</a>
+ * @version $Revision: 231110 $
  */
-public class TestMcKoiBuilder extends TestBuilderBase
+public class TestMcKoiPlatform extends TestPlatformBase
 {
     /* (non-Javadoc)
-     * @see org.apache.ddlutils.builder.TestBuilderBase#getDatabaseName()
+     * @see org.apache.ddlutils.builder.TestPlatformBase#getDatabaseName()
      */
     protected String getDatabaseName()
     {
-        return MckoiSqlBuilder.DATABASENAME;
+        return MckoiPlatform.DATABASENAME;
     }
 
     /**
@@ -39,12 +40,6 @@
      */
     public void testColumnTypes() throws Exception
     {
-        Database testDb = parseDatabaseFromString(COLUMN_TEST_SCHEMA);
-
-        // we're turning the comment creation off to make testing easier
-        getBuilder().setCommentsSupported(false);
-        getBuilder().createDatabase(testDb);
-
         assertEqualsIgnoringWhitespaces(
             "DROP TABLE IF EXISTS coltype;\n"+
             "CREATE TABLE coltype\n"+
@@ -81,6 +76,6 @@
             "    COL_VARBINARY       VARBINARY(15),\n"+
             "    COL_VARCHAR         VARCHAR(15)\n"+
             ");\n",
-            getBuilderOutput());
+            createTestDatabase());
     }
 }

Copied: db/ddlutils/trunk/src/test/org/apache/ddlutils/builder/TestMySqlPlatform.java (from
r226549, db/ddlutils/trunk/src/test/org/apache/ddlutils/builder/TestMySqlBuilder.java)
URL: http://svn.apache.org/viewcvs/db/ddlutils/trunk/src/test/org/apache/ddlutils/builder/TestMySqlPlatform.java?p2=db/ddlutils/trunk/src/test/org/apache/ddlutils/builder/TestMySqlPlatform.java&p1=db/ddlutils/trunk/src/test/org/apache/ddlutils/builder/TestMySqlBuilder.java&r1=226549&r2=232530&rev=232530&view=diff
==============================================================================
--- db/ddlutils/trunk/src/test/org/apache/ddlutils/builder/TestMySqlBuilder.java (original)
+++ db/ddlutils/trunk/src/test/org/apache/ddlutils/builder/TestMySqlPlatform.java Sat Aug
13 14:36:44 2005
@@ -16,22 +16,23 @@
  * limitations under the License.
  */
 
-import org.apache.ddlutils.TestBuilderBase;
-import org.apache.ddlutils.model.Database;
+import org.apache.ddlutils.TestPlatformBase;
+import org.apache.ddlutils.platform.MySqlPlatform;
 
 /**
- * Tests the MySQL builder.
+ * Tests the MySQL platform.
  * 
  * @author <a href="mailto:tomdz@apache.org">Thomas Dudziak</a>
+ * @version $Revision: 231110 $
  */
-public class TestMySqlBuilder extends TestBuilderBase
+public class TestMySqlPlatform extends TestPlatformBase
 {
     /* (non-Javadoc)
-     * @see org.apache.ddlutils.builder.TestBuilderBase#getDatabaseName()
+     * @see org.apache.ddlutils.builder.TestPlatformBase#getDatabaseName()
      */
     protected String getDatabaseName()
     {
-        return MySqlBuilder.DATABASENAME;
+        return MySqlPlatform.DATABASENAME;
     }
 
     /**
@@ -39,12 +40,6 @@
      */
     public void testColumnTypes() throws Exception
     {
-        Database testDb = parseDatabaseFromString(COLUMN_TEST_SCHEMA);
-
-        // we're turning the comment creation off to make testing easier
-        getBuilder().setCommentsSupported(false);
-        getBuilder().createDatabase(testDb);
-
         assertEqualsIgnoringWhitespaces(
             "DROP TABLE IF EXISTS coltype;\n"+
             "CREATE TABLE coltype\n"+
@@ -81,6 +76,6 @@
             "    COL_VARBINARY       VARCHAR(15) BINARY,\n"+
             "    COL_VARCHAR         VARCHAR(15)\n"+
             ");\n",
-            getBuilderOutput());
+            createTestDatabase());
     }
 }

Added: db/ddlutils/trunk/src/test/org/apache/ddlutils/builder/TestOracle8Platform.java
URL: http://svn.apache.org/viewcvs/db/ddlutils/trunk/src/test/org/apache/ddlutils/builder/TestOracle8Platform.java?rev=232530&view=auto
==============================================================================
--- db/ddlutils/trunk/src/test/org/apache/ddlutils/builder/TestOracle8Platform.java (added)
+++ db/ddlutils/trunk/src/test/org/apache/ddlutils/builder/TestOracle8Platform.java Sat Aug
13 14:36:44 2005
@@ -0,0 +1,81 @@
+package org.apache.ddlutils.builder;
+
+/*
+ * Copyright 1999-2004 The Apache Software Foundation.
+ * 
+ * Licensed 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 org.apache.ddlutils.TestPlatformBase;
+import org.apache.ddlutils.platform.Oracle8Platform;
+
+/**
+ * Tests the Oracle platform.
+ * 
+ * @author <a href="mailto:tomdz@apache.org">Thomas Dudziak</a>
+ * @version $Revision: 231110 $
+ */
+public class TestOracle8Platform extends TestPlatformBase
+{
+    /* (non-Javadoc)
+     * @see org.apache.ddlutils.builder.TestBuilderBase#getDatabaseName()
+     */
+    protected String getDatabaseName()
+    {
+        return Oracle8Platform.DATABASENAME;
+    }
+
+    /**
+     * Tests the column types.
+     */
+    public void testColumnTypes() throws Exception
+    {
+        assertEqualsIgnoringWhitespaces(
+            "DROP TABLE coltype CASCADE CONSTRAINTS;\n"+
+            "CREATE TABLE coltype\n"+
+            "(\n"+
+            "    COL_ARRAY           BLOB,\n"+
+            "    COL_BIGINT          NUMBER(38,0),\n"+
+            "    COL_BINARY          RAW(254),\n"+
+            "    COL_BIT             NUMBER(1,0),\n"+
+            "    COL_BLOB            BLOB,\n"+
+            "    COL_BOOLEAN         NUMBER(1,0),\n"+
+            "    COL_CHAR            CHAR(15),\n"+
+            "    COL_CLOB            CLOB,\n"+
+            "    COL_DATALINK        BLOB,\n"+
+            "    COL_DATE            DATE,\n"+
+            "    COL_DECIMAL         NUMBER(15,3),\n"+
+            "    COL_DECIMAL_NOSCALE NUMBER(15,0),\n"+
+            "    COL_DISTINCT        BLOB,\n"+
+            "    COL_DOUBLE          NUMBER(38),\n"+
+            "    COL_FLOAT           NUMBER(38),\n"+
+            "    COL_INTEGER         NUMBER(20,0),\n"+
+            "    COL_JAVA_OBJECT     BLOB,\n"+
+            "    COL_LONGVARBINARY   BLOB,\n"+
+            "    COL_LONGVARCHAR     CLOB,\n"+
+            "    COL_NULL            BLOB,\n"+
+            "    COL_NUMERIC         NUMBER(15,0),\n"+
+            "    COL_OTHER           BLOB,\n"+
+            "    COL_REAL            NUMBER(18),\n"+
+            "    COL_REF             BLOB,\n"+
+            "    COL_SMALLINT        NUMBER(5,0),\n"+
+            "    COL_STRUCT          BLOB,\n"+
+            "    COL_TIME            DATE,\n"+
+            "    COL_TIMESTAMP       DATE,\n"+
+            "    COL_TINYINT         NUMBER(3,0),\n"+
+            "    COL_VARBINARY       RAW(15),\n"+
+            "    COL_VARCHAR         VARCHAR2(15)\n"+
+            ");\n",
+            createTestDatabase());
+    }
+}

Added: db/ddlutils/trunk/src/test/org/apache/ddlutils/builder/TestOracle9Platform.java
URL: http://svn.apache.org/viewcvs/db/ddlutils/trunk/src/test/org/apache/ddlutils/builder/TestOracle9Platform.java?rev=232530&view=auto
==============================================================================
--- db/ddlutils/trunk/src/test/org/apache/ddlutils/builder/TestOracle9Platform.java (added)
+++ db/ddlutils/trunk/src/test/org/apache/ddlutils/builder/TestOracle9Platform.java Sat Aug
13 14:36:44 2005
@@ -0,0 +1,81 @@
+package org.apache.ddlutils.builder;
+
+/*
+ * Copyright 1999-2004 The Apache Software Foundation.
+ * 
+ * Licensed 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 org.apache.ddlutils.TestPlatformBase;
+import org.apache.ddlutils.platform.Oracle9Platform;
+
+/**
+ * Tests the Oracle 9 platform.
+ * 
+ * @author <a href="mailto:tomdz@apache.org">Thomas Dudziak</a>
+ * @version $Revision: 231110 $
+ */
+public class TestOracle9Platform extends TestPlatformBase
+{
+    /* (non-Javadoc)
+     * @see org.apache.ddlutils.builder.TestBuilderBase#getDatabaseName()
+     */
+    protected String getDatabaseName()
+    {
+        return Oracle9Platform.DATABASENAME;
+    }
+
+    /**
+     * Tests the column types.
+     */
+    public void testColumnTypes() throws Exception
+    {
+        assertEqualsIgnoringWhitespaces(
+            "DROP TABLE coltype CASCADE CONSTRAINTS;\n"+
+            "CREATE TABLE coltype\n"+
+            "(\n"+
+            "    COL_ARRAY           BLOB,\n"+
+            "    COL_BIGINT          NUMBER(38,0),\n"+
+            "    COL_BINARY          RAW(254),\n"+
+            "    COL_BIT             NUMBER(1,0),\n"+
+            "    COL_BLOB            BLOB,\n"+
+            "    COL_BOOLEAN         NUMBER(1,0),\n"+
+            "    COL_CHAR            CHAR(15),\n"+
+            "    COL_CLOB            CLOB,\n"+
+            "    COL_DATALINK        BLOB,\n"+
+            "    COL_DATE            DATE,\n"+
+            "    COL_DECIMAL         NUMBER(15,3),\n"+
+            "    COL_DECIMAL_NOSCALE NUMBER(15,0),\n"+
+            "    COL_DISTINCT        BLOB,\n"+
+            "    COL_DOUBLE          NUMBER(38),\n"+
+            "    COL_FLOAT           NUMBER(38),\n"+
+            "    COL_INTEGER         NUMBER(20,0),\n"+
+            "    COL_JAVA_OBJECT     BLOB,\n"+
+            "    COL_LONGVARBINARY   BLOB,\n"+
+            "    COL_LONGVARCHAR     CLOB,\n"+
+            "    COL_NULL            BLOB,\n"+
+            "    COL_NUMERIC         NUMBER(15,0),\n"+
+            "    COL_OTHER           BLOB,\n"+
+            "    COL_REAL            NUMBER(18),\n"+
+            "    COL_REF             BLOB,\n"+
+            "    COL_SMALLINT        NUMBER(5,0),\n"+
+            "    COL_STRUCT          BLOB,\n"+
+            "    COL_TIME            DATE,\n"+
+            "    COL_TIMESTAMP       TIMESTAMP,\n"+
+            "    COL_TINYINT         NUMBER(3,0),\n"+
+            "    COL_VARBINARY       RAW(15),\n"+
+            "    COL_VARCHAR         VARCHAR2(15)\n"+
+            ");\n",
+            createTestDatabase());
+    }
+}

Copied: db/ddlutils/trunk/src/test/org/apache/ddlutils/builder/TestPostgresqlPlatform.java
(from r226549, db/ddlutils/trunk/src/test/org/apache/ddlutils/builder/TestPostgresqlBuilder.java)
URL: http://svn.apache.org/viewcvs/db/ddlutils/trunk/src/test/org/apache/ddlutils/builder/TestPostgresqlPlatform.java?p2=db/ddlutils/trunk/src/test/org/apache/ddlutils/builder/TestPostgresqlPlatform.java&p1=db/ddlutils/trunk/src/test/org/apache/ddlutils/builder/TestPostgresqlBuilder.java&r1=226549&r2=232530&rev=232530&view=diff
==============================================================================
--- db/ddlutils/trunk/src/test/org/apache/ddlutils/builder/TestPostgresqlBuilder.java (original)
+++ db/ddlutils/trunk/src/test/org/apache/ddlutils/builder/TestPostgresqlPlatform.java Sat
Aug 13 14:36:44 2005
@@ -16,20 +16,23 @@
  * limitations under the License.
  */
 
-import org.apache.ddlutils.TestBuilderBase;
-import org.apache.ddlutils.model.Database;
+import org.apache.ddlutils.TestPlatformBase;
+import org.apache.ddlutils.platform.PostgreSqlPlatform;
 
 /**
- * Tests the PostgreSQL builder.
+ * Tests the PostgreSQL platform.
+ * 
+ * @author <a href="mailto:tomdz@apache.org">Thomas Dudziak</a>
+ * @version $Revision: 231110 $
  */
-public class TestPostgresqlBuilder extends TestBuilderBase
+public class TestPostgresqlPlatform extends TestPlatformBase
 {
     /* (non-Javadoc)
-     * @see org.apache.ddlutils.builder.TestBuilderBase#getDatabaseName()
+     * @see org.apache.ddlutils.builder.TestPlatformBase#getDatabaseName()
      */
     protected String getDatabaseName()
     {
-        return PostgreSqlBuilder.DATABASENAME;
+        return PostgreSqlPlatform.DATABASENAME;
     }
 
     /**
@@ -37,12 +40,6 @@
      */
     public void testColumnTypes() throws Exception
     {
-        Database testDb = parseDatabaseFromString(COLUMN_TEST_SCHEMA);
-
-        // we're turning the comment creation off to make testing easier
-        getBuilder().setCommentsSupported(false);
-        getBuilder().createDatabase(testDb);
-
         assertEqualsIgnoringWhitespaces(
             "DROP TABLE coltype CASCADE;\n"+
             "CREATE TABLE coltype\n"+
@@ -79,6 +76,6 @@
             "    COL_VARBINARY       BYTEA,\n"+
             "    COL_VARCHAR         VARCHAR(15)\n"+
             ");\n",
-            getBuilderOutput());
+            createTestDatabase());
     }
 }

Copied: db/ddlutils/trunk/src/test/org/apache/ddlutils/builder/TestSapDbPlatform.java (from
r226549, db/ddlutils/trunk/src/test/org/apache/ddlutils/builder/TestSapDbBuilder.java)
URL: http://svn.apache.org/viewcvs/db/ddlutils/trunk/src/test/org/apache/ddlutils/builder/TestSapDbPlatform.java?p2=db/ddlutils/trunk/src/test/org/apache/ddlutils/builder/TestSapDbPlatform.java&p1=db/ddlutils/trunk/src/test/org/apache/ddlutils/builder/TestSapDbBuilder.java&r1=226549&r2=232530&rev=232530&view=diff
==============================================================================
--- db/ddlutils/trunk/src/test/org/apache/ddlutils/builder/TestSapDbBuilder.java (original)
+++ db/ddlutils/trunk/src/test/org/apache/ddlutils/builder/TestSapDbPlatform.java Sat Aug
13 14:36:44 2005
@@ -16,20 +16,23 @@
  * limitations under the License.
  */
 
-import org.apache.ddlutils.TestBuilderBase;
-import org.apache.ddlutils.model.Database;
+import org.apache.ddlutils.TestPlatformBase;
+import org.apache.ddlutils.platform.SapDbPlatform;
 
 /**
- * Tests the SapDB builder.
+ * Tests the SapDB platform.
+ * 
+ * @author <a href="mailto:tomdz@apache.org">Thomas Dudziak</a>
+ * @version $Revision: 231110 $
  */
-public class TestSapDbBuilder extends TestBuilderBase
+public class TestSapDbPlatform extends TestPlatformBase
 {
     /* (non-Javadoc)
-     * @see org.apache.ddlutils.builder.TestBuilderBase#getDatabaseName()
+     * @see org.apache.ddlutils.builder.TestPlatformBase#getDatabaseName()
      */
     protected String getDatabaseName()
     {
-        return SapDbBuilder.DATABASENAME;
+        return SapDbPlatform.DATABASENAME;
     }
 
     /**
@@ -37,12 +40,6 @@
      */
     public void testColumnTypes() throws Exception
     {
-        Database testDb = parseDatabaseFromString(COLUMN_TEST_SCHEMA);
-
-        // we're turning the comment creation off to make testing easier
-        getBuilder().setCommentsSupported(false);
-        getBuilder().createDatabase(testDb);
-
         assertEqualsIgnoringWhitespaces(
             "DROP TABLE coltype CASCADE;\n"+
             "CREATE TABLE coltype\n"+
@@ -79,6 +76,6 @@
             "    COL_VARBINARY       LONG BYTE,\n"+
             "    COL_VARCHAR         VARCHAR(15)\n"+
             ");\n",
-            getBuilderOutput());
+            createTestDatabase());
     }
 }

Copied: db/ddlutils/trunk/src/test/org/apache/ddlutils/builder/TestSybasePlatform.java (from
r226549, db/ddlutils/trunk/src/test/org/apache/ddlutils/builder/TestSybaseBuilder.java)
URL: http://svn.apache.org/viewcvs/db/ddlutils/trunk/src/test/org/apache/ddlutils/builder/TestSybasePlatform.java?p2=db/ddlutils/trunk/src/test/org/apache/ddlutils/builder/TestSybasePlatform.java&p1=db/ddlutils/trunk/src/test/org/apache/ddlutils/builder/TestSybaseBuilder.java&r1=226549&r2=232530&rev=232530&view=diff
==============================================================================
--- db/ddlutils/trunk/src/test/org/apache/ddlutils/builder/TestSybaseBuilder.java (original)
+++ db/ddlutils/trunk/src/test/org/apache/ddlutils/builder/TestSybasePlatform.java Sat Aug
13 14:36:44 2005
@@ -16,20 +16,23 @@
  * limitations under the License.
  */
 
-import org.apache.ddlutils.TestBuilderBase;
-import org.apache.ddlutils.model.Database;
+import org.apache.ddlutils.TestPlatformBase;
+import org.apache.ddlutils.platform.SybasePlatform;
 
 /**
- * Tests the Sybase builder.
+ * Tests the Sybase platform.
+ * 
+ * @author <a href="mailto:tomdz@apache.org">Thomas Dudziak</a>
+ * @version $Revision: 231110 $
  */
-public class TestSybaseBuilder extends TestBuilderBase
+public class TestSybasePlatform extends TestPlatformBase
 {
     /* (non-Javadoc)
-     * @see org.apache.ddlutils.builder.TestBuilderBase#getDatabaseName()
+     * @see org.apache.ddlutils.builder.TestPlatformBase#getDatabaseName()
      */
     protected String getDatabaseName()
     {
-        return SybaseBuilder.DATABASENAME;
+        return SybasePlatform.DATABASENAME;
     }
 
     /**
@@ -37,12 +40,6 @@
      */
     public void testColumnTypes() throws Exception
     {
-        Database testDb = parseDatabaseFromString(COLUMN_TEST_SCHEMA);
-
-        // we're turning the comment creation off to make testing easier
-        getBuilder().setCommentsSupported(false);
-        getBuilder().createDatabase(testDb);
-
         assertEqualsIgnoringWhitespaces(
             "IF EXISTS (SELECT 1 FROM sysobjects WHERE type = 'U' AND name = 'coltype')\n"+
             "BEGIN\n"+
@@ -82,6 +79,6 @@
             "    COL_VARBINARY       VARBINARY(15),\n"+
             "    COL_VARCHAR         VARCHAR(15)\n"+
             ");\n",
-            getBuilderOutput());
+            createTestDatabase());
     }
 }

Modified: db/ddlutils/trunk/src/test/org/apache/ddlutils/dynabean/TestDynaSqlQueries.java
URL: http://svn.apache.org/viewcvs/db/ddlutils/trunk/src/test/org/apache/ddlutils/dynabean/TestDynaSqlQueries.java?rev=232530&r1=232529&r2=232530&view=diff
==============================================================================
--- db/ddlutils/trunk/src/test/org/apache/ddlutils/dynabean/TestDynaSqlQueries.java (original)
+++ db/ddlutils/trunk/src/test/org/apache/ddlutils/dynabean/TestDynaSqlQueries.java Sat Aug
13 14:36:44 2005
@@ -26,9 +26,8 @@
             "  <TestTable Id='3' Text='Text 3'/>"+
             "</data>");
 
-        DynaSql         dynaSql = new DynaSql(getBuilder(), getDataSource(), getModel());
-        DynaSqlIterator it      = (DynaSqlIterator)dynaSql.query("SELECT * FROM TestTable");
-        DynaBean        bean    = null;
+        DynaSqlIterator it   = (DynaSqlIterator)getPlatform().query(getModel(), "SELECT *
FROM TestTable");
+        DynaBean        bean = null;
 
         assertTrue(it.hasNext());
         // we call the method a second time to assert that the result set does not get advanced
twice
@@ -82,8 +81,7 @@
             "  <TestTable Id='3' Text='Text 3'/>"+
             "</data>");
 
-        DynaSql  dynaSql = new DynaSql(getBuilder(), getDataSource(), getModel());
-        List     beans   = dynaSql.fetch("SELECT * FROM TestTable");
+        List beans = getPlatform().fetch(getModel(), "SELECT * FROM TestTable");
 
         assertEquals(3,
                      beans.size());
@@ -135,9 +133,8 @@
             "  <TestTable2 Id='3' Text='Text 3'/>"+
             "</data>");
 
-        DynaSql         dynaSql = new DynaSql(getBuilder(), getDataSource(), getModel());
-        DynaSqlIterator it      = (DynaSqlIterator)dynaSql.query("SELECT Id1, Text FROM TestTable1,
TestTable2 WHERE Id2 = Id");
-        DynaBean        bean    = null;
+        DynaSqlIterator it   = (DynaSqlIterator)getPlatform().query(getModel(), "SELECT Id1,
Text FROM TestTable1, TestTable2 WHERE Id2 = Id");
+        DynaBean        bean = null;
 
         assertTrue(it.hasNext());
 

Modified: db/ddlutils/trunk/src/test/org/apache/ddlutils/io/TestAgainstAxionDb.java
URL: http://svn.apache.org/viewcvs/db/ddlutils/trunk/src/test/org/apache/ddlutils/io/TestAgainstAxionDb.java?rev=232530&r1=232529&r2=232530&view=diff
==============================================================================
--- db/ddlutils/trunk/src/test/org/apache/ddlutils/io/TestAgainstAxionDb.java (original)
+++ db/ddlutils/trunk/src/test/org/apache/ddlutils/io/TestAgainstAxionDb.java Sat Aug 13 14:36:44
2005
@@ -17,8 +17,6 @@
  */
 
 import org.apache.ddlutils.TestDatabaseWriterBase;
-import org.apache.ddlutils.model.Database;
-import org.apache.ddlutils.util.DDLExecutor;
 
 public class TestAgainstAxionDb extends TestDatabaseWriterBase
 {
@@ -56,14 +54,6 @@
 
     public void _testCreation() throws Exception
     {
-        Database testDb = parseDatabaseFromString(COLUMN_TEST_SCHEMA);
-
-        getBuilder().createDatabase(testDb);
-
-        DDLExecutor executor = new DDLExecutor(getDataSource());
-        String      sql      = getBuilderOutput();
-
-        System.out.println(sql);
-        executor.evaluateBatch(sql);
+        createDatabase(COLUMN_TEST_SCHEMA);
     }
 }



Mime
View raw message