db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From arm...@apache.org
Subject svn commit: r452268 - in /db/ojb/trunk/src/test/org/apache/ojb/broker/sequence: DatabaseIdentityHsqlTest.java DatabaseIdentityMaxDBTest.java DatabaseIdentityMySqlTest.java DatabaseIdentityTest.java
Date Mon, 02 Oct 2006 23:55:47 GMT
Author: arminw
Date: Mon Oct  2 16:55:46 2006
New Revision: 452268

URL: http://svn.apache.org/viewvc?view=rev&rev=452268
Log:
fix, cleanup tests

Modified:
    db/ojb/trunk/src/test/org/apache/ojb/broker/sequence/DatabaseIdentityHsqlTest.java
    db/ojb/trunk/src/test/org/apache/ojb/broker/sequence/DatabaseIdentityMaxDBTest.java
    db/ojb/trunk/src/test/org/apache/ojb/broker/sequence/DatabaseIdentityMySqlTest.java
    db/ojb/trunk/src/test/org/apache/ojb/broker/sequence/DatabaseIdentityTest.java

Modified: db/ojb/trunk/src/test/org/apache/ojb/broker/sequence/DatabaseIdentityHsqlTest.java
URL: http://svn.apache.org/viewvc/db/ojb/trunk/src/test/org/apache/ojb/broker/sequence/DatabaseIdentityHsqlTest.java?view=diff&rev=452268&r1=452267&r2=452268
==============================================================================
--- db/ojb/trunk/src/test/org/apache/ojb/broker/sequence/DatabaseIdentityHsqlTest.java (original)
+++ db/ojb/trunk/src/test/org/apache/ojb/broker/sequence/DatabaseIdentityHsqlTest.java Mon
Oct  2 16:55:46 2006
@@ -37,7 +37,6 @@
 
     protected void initDBDependend() throws Exception
     {
-        databaseName = "Hsql";
         dropConstraintMainTable = "ALTER TABLE NATIVE_MAIN_OBJECT DROP CONSTRAINT MAIN_REF_FK";
         createMainTable = "CREATE TABLE NATIVE_MAIN_OBJECT(NATIVE_ID IDENTITY NOT NULL PRIMARY
KEY, REF_ID int,NAME VARCHAR(250))";
         createRefTable = "CREATE TABLE NATIVE_REFERENCE_OBJECT (NATIVE_ID IDENTITY NOT NULL
PRIMARY KEY," +
@@ -49,5 +48,10 @@
     protected boolean isSupportedDatabase()
     {
         return platform instanceof PlatformHsqldbImpl;
+    }
+
+    protected String getSupportedDatabase()
+    {
+        return "hsql";
     }
 }

Modified: db/ojb/trunk/src/test/org/apache/ojb/broker/sequence/DatabaseIdentityMaxDBTest.java
URL: http://svn.apache.org/viewvc/db/ojb/trunk/src/test/org/apache/ojb/broker/sequence/DatabaseIdentityMaxDBTest.java?view=diff&rev=452268&r1=452267&r2=452268
==============================================================================
--- db/ojb/trunk/src/test/org/apache/ojb/broker/sequence/DatabaseIdentityMaxDBTest.java (original)
+++ db/ojb/trunk/src/test/org/apache/ojb/broker/sequence/DatabaseIdentityMaxDBTest.java Mon
Oct  2 16:55:46 2006
@@ -38,7 +38,6 @@
 
     protected void initDBDependend() throws Exception
     {
-        databaseName = "MaxDB/SapDB";
         dropConstraintMainTable = "ALTER TABLE NATIVE_MAIN_OBJECT DROP FOREIGN KEY MAIN_REF_FK";
         createMainTable = "CREATE TABLE NATIVE_MAIN_OBJECT" +
                 "(NATIVE_ID SERIAL PRIMARY KEY, REF_ID FIXED(10), NAME VARCHAR(250))";
@@ -51,5 +50,10 @@
     protected boolean isSupportedDatabase()
     {
         return platform instanceof PlatformMaxDBImpl || platform instanceof PlatformSapdbImpl;
+    }
+
+    protected String getSupportedDatabase()
+    {
+        return "maxdb";
     }
 }

Modified: db/ojb/trunk/src/test/org/apache/ojb/broker/sequence/DatabaseIdentityMySqlTest.java
URL: http://svn.apache.org/viewvc/db/ojb/trunk/src/test/org/apache/ojb/broker/sequence/DatabaseIdentityMySqlTest.java?view=diff&rev=452268&r1=452267&r2=452268
==============================================================================
--- db/ojb/trunk/src/test/org/apache/ojb/broker/sequence/DatabaseIdentityMySqlTest.java (original)
+++ db/ojb/trunk/src/test/org/apache/ojb/broker/sequence/DatabaseIdentityMySqlTest.java Mon
Oct  2 16:55:46 2006
@@ -37,7 +37,6 @@
 
     protected void initDBDependend() throws Exception
     {
-        databaseName = "MySQL";
         dropConstraintMainTable = "ALTER TABLE NATIVE_MAIN_OBJECT DROP FOREIGN KEY MAIN_REF_FK";
         createMainTable = "CREATE TABLE NATIVE_MAIN_OBJECT(NATIVE_ID int(11) NOT NULL PRIMARY
KEY auto_increment,REF_ID int(11),NAME VARCHAR(250))";
         createRefTable =
@@ -49,5 +48,10 @@
     protected boolean isSupportedDatabase()
     {
         return platform instanceof PlatformMySQLImpl;
+    }
+
+    protected String getSupportedDatabase()
+    {
+        return "mysql";
     }
 }

Modified: db/ojb/trunk/src/test/org/apache/ojb/broker/sequence/DatabaseIdentityTest.java
URL: http://svn.apache.org/viewvc/db/ojb/trunk/src/test/org/apache/ojb/broker/sequence/DatabaseIdentityTest.java?view=diff&rev=452268&r1=452267&r2=452268
==============================================================================
--- db/ojb/trunk/src/test/org/apache/ojb/broker/sequence/DatabaseIdentityTest.java (original)
+++ db/ojb/trunk/src/test/org/apache/ojb/broker/sequence/DatabaseIdentityTest.java Mon Oct
 2 16:55:46 2006
@@ -64,7 +64,10 @@
      */
     abstract protected boolean isSupportedDatabase();
 
-    protected String databaseName;
+    /**
+     * Return the name of current database.
+     */
+    abstract protected String getSupportedDatabase();
 
     // Statements for MainObject table
     protected String dropMainTable = "DROP TABLE NATIVE_MAIN_OBJECT";
@@ -158,7 +161,7 @@
     {
         if(!isSupportedDatabase())
         {
-            this.ojbSkipTestMessage("Skip " + databaseName + " specific test");
+            this.ojbSkipTestMessage("Skip " + getSupportedDatabase() + " specific test");
             return;
         }
 
@@ -174,7 +177,7 @@
     {
         if(!isSupportedDatabase())
         {
-            this.ojbSkipTestMessage("Skip " + databaseName + " specific test");
+            this.ojbSkipTestMessage("Skip " + getSupportedDatabase() + " specific test");
             return;
         }
 
@@ -190,7 +193,7 @@
     {
         if(!isSupportedDatabase())
         {
-            this.ojbSkipTestMessage("Skip " + databaseName + " specific test");
+            this.ojbSkipTestMessage("Skip " + getSupportedDatabase() + " specific test");
             return;
         }
 
@@ -224,7 +227,7 @@
     {
         if(!isSupportedDatabase())
         {
-            this.ojbSkipTestMessage("Skip " + databaseName + " specific test");
+            this.ojbSkipTestMessage("Skip " + getSupportedDatabase() + " specific test");
             return;
         }
 
@@ -239,7 +242,7 @@
     {
         if(!isSupportedDatabase())
         {
-            this.ojbSkipTestMessage("Skip " + databaseName + " specific test");
+            this.ojbSkipTestMessage("Skip " + getSupportedDatabase() + " specific test");
             return;
         }
 
@@ -253,7 +256,7 @@
     {
         if(!isSupportedDatabase())
         {
-            this.ojbSkipTestMessage("Skip " + databaseName + " specific test");
+            this.ojbSkipTestMessage("Skip " + getSupportedDatabase() + " specific test");
             return;
         }
 
@@ -289,7 +292,7 @@
     {
         if(!isSupportedDatabase())
         {
-            this.ojbSkipTestMessage("Skip " + databaseName + " specific test");
+            this.ojbSkipTestMessage("Skip " + getSupportedDatabase() + " specific test");
             return;
         }
 
@@ -305,7 +308,7 @@
     {
         if(!isSupportedDatabase())
         {
-            this.ojbSkipTestMessage("Skip " + databaseName + " specific test");
+            this.ojbSkipTestMessage("Skip " + getSupportedDatabase() + " specific test");
             return;
         }
 
@@ -321,7 +324,7 @@
     {
         if(!isSupportedDatabase())
         {
-            this.ojbSkipTestMessage("Skip " + databaseName + " specific test");
+            this.ojbSkipTestMessage("Skip " + getSupportedDatabase() + " specific test");
             return;
         }
 
@@ -506,7 +509,7 @@
     {
         if(!isSupportedDatabase())
         {
-            this.ojbSkipTestMessage("Skip " + databaseName + " specific test");
+            this.ojbSkipTestMessage("Skip " + getSupportedDatabase() + " specific test");
             return;
         }
 
@@ -667,7 +670,7 @@
     {
         if(!isSupportedDatabase())
         {
-            this.ojbSkipTestMessage("Skip " + databaseName + " specific test");
+            this.ojbSkipTestMessage("Skip " + getSupportedDatabase() + " specific test");
             return;
         }
 
@@ -894,7 +897,7 @@
     {
         if(!isSupportedDatabase())
         {
-            this.ojbSkipTestMessage("Skip " + databaseName + " specific test");
+            this.ojbSkipTestMessage("Skip " + getSupportedDatabase() + " specific test");
             return;
         }
 
@@ -910,7 +913,7 @@
     {
         if(!isSupportedDatabase())
         {
-            this.ojbSkipTestMessage("Skip " + databaseName + " specific test");
+            this.ojbSkipTestMessage("Skip " + getSupportedDatabase() + " specific test");
             return;
         }
 
@@ -965,7 +968,7 @@
     {
         if(!isSupportedDatabase())
         {
-            this.ojbSkipTestMessage("Skip " + databaseName + " specific test");
+            this.ojbSkipTestMessage("Skip " + getSupportedDatabase() + " specific test");
             return;
         }
 
@@ -981,7 +984,7 @@
     {
         if(!isSupportedDatabase())
         {
-            this.ojbSkipTestMessage("Skip " + databaseName + " specific test");
+            this.ojbSkipTestMessage("Skip " + getSupportedDatabase() + " specific test");
             return;
         }
 
@@ -997,7 +1000,7 @@
     {
         if(!isSupportedDatabase())
         {
-            this.ojbSkipTestMessage("Skip " + databaseName + " specific test");
+            this.ojbSkipTestMessage("Skip " + getSupportedDatabase() + " specific test");
             return;
         }
 



---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org


Mime
View raw message