db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d..@apache.org
Subject svn commit: r424135 - in /db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests: tests/jdbcapi/BLOBDataModelSetup.java tests/jdbcapi/ProcedureTest.java tests/jdbcapi/SURDataModelSetup.java util/BaseJDBCTestCase.java util/BaseTestCase.java
Date Thu, 20 Jul 2006 23:49:24 GMT
Author: djd
Date: Thu Jul 20 16:49:23 2006
New Revision: 424135

URL: http://svn.apache.org/viewvc?rev=424135&view=rev
Log:
DERBY-1555 (partial) Minor cleanup on some JUnit tests, make the base test classes abstract.

Modified:
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/BLOBDataModelSetup.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/ProcedureTest.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/SURDataModelSetup.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/util/BaseJDBCTestCase.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/util/BaseTestCase.java

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/BLOBDataModelSetup.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/BLOBDataModelSetup.java?rev=424135&r1=424134&r2=424135&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/BLOBDataModelSetup.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/BLOBDataModelSetup.java
Thu Jul 20 16:49:23 2006
@@ -54,7 +54,7 @@
      * with blob columns.
      * @exception Exception any exception will cause test to fail with error.
      */
-    public final void setUp() 
+    protected final void setUp() 
         throws Exception
     {
         con = BaseJDBCTestCase.getConnection();
@@ -102,7 +102,7 @@
      * Rollback connection and close it.
      * @exception Exceptions causes the test to fail with error
      */
-    public final void tearDown() 
+    protected final void tearDown() 
         throws Exception
     {
         try { 

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/ProcedureTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/ProcedureTest.java?rev=424135&r1=424134&r2=424135&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/ProcedureTest.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/ProcedureTest.java
Thu Jul 20 16:49:23 2006
@@ -615,7 +615,7 @@
      *
      * @param sqle a <code>SQLException</code> value
      */
-    private static void assertNoResultSetFromExecuteQuery(SQLException sqle) {
+    private void assertNoResultSetFromExecuteQuery(SQLException sqle) {
         if (usingDerbyNet()) {
             assertNull("Unexpected SQL state.", sqle.getSQLState());
         } else {
@@ -629,7 +629,7 @@
      *
      * @param sqle a <code>SQLException</code> value
      */
-    private static void assertMultipleResultsFromExecuteQuery(SQLException sqle)
+    private void assertMultipleResultsFromExecuteQuery(SQLException sqle)
     {
         if (usingDerbyNet()) {
             assertNull("Unexpected SQL state.", sqle.getSQLState());
@@ -644,7 +644,7 @@
      *
      * @param sqle a <code>SQLException</code> value
      */
-    private static void assertResultsFromExecuteUpdate(SQLException sqle) {
+    private void assertResultsFromExecuteUpdate(SQLException sqle) {
         if (usingDerbyNet()) {
             assertNull("Unexpected SQL state.", sqle.getSQLState());
         } else {
@@ -698,10 +698,10 @@
                   "_prepared"));
         }
         return new TestSetup(suite) {
-            public void setUp() throws Exception {
+            protected void setUp() throws Exception {
                 oneTimeSetUp();
             }
-            public void tearDown() throws Exception {
+            protected void tearDown() throws Exception {
                 oneTimeTearDown();
             }
         };

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/SURDataModelSetup.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/SURDataModelSetup.java?rev=424135&r1=424134&r2=424135&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/SURDataModelSetup.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/SURDataModelSetup.java
Thu Jul 20 16:49:23 2006
@@ -18,7 +18,6 @@
  * language governing permissions and limitations under the License.
  */
 package org.apache.derbyTesting.functionTests.tests.jdbcapi;
-import org.apache.derbyTesting.functionTests.util.TestConfiguration;
 import org.apache.derbyTesting.functionTests.util.TestUtil;
 import org.apache.derbyTesting.functionTests.util.BaseJDBCTestCase;
 import java.sql.Connection;
@@ -38,17 +37,7 @@
  * @author Andreas Korneliussen
  */
 public class SURDataModelSetup extends TestSetup
-{
-	
-	 /**
-     * Configuration for the test case.
-     * The configuration is created based on system properties.
-     *
-     * @see TestConfiguration
-     */
-    public static final TestConfiguration CONFIG = 
-        TestConfiguration.DERBY_TEST_CONFIG;
-    
+{  
     /**
      * Constructor.
      * @param test test to decorate with this setup
@@ -134,7 +123,7 @@
      * Creates a datamodel for testing Scrollable Updatable ResultSets
      * and populates the database model with data.
      */
-    public void setUp() throws  Exception {       
+    protected void setUp() throws  Exception {       
         println("Setting up datamodel: " + model);
         try {
             con = getNewConnection();
@@ -148,7 +137,7 @@
     /**
      * Delete the datamodel
      */
-    public void tearDown() 
+    protected void tearDown() 
         throws Exception
     {
         try {

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/util/BaseJDBCTestCase.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/util/BaseJDBCTestCase.java?rev=424135&r1=424134&r2=424135&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/util/BaseJDBCTestCase.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/util/BaseJDBCTestCase.java
Thu Jul 20 16:49:23 2006
@@ -29,7 +29,7 @@
  * A method for getting a default connection is provided, along with methods
  * for telling if a specific JDBC client is used.
  */
-public class BaseJDBCTestCase
+public abstract class BaseJDBCTestCase
     extends BaseTestCase {
 
     /**

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/util/BaseTestCase.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/util/BaseTestCase.java?rev=424135&r1=424134&r2=424135&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/util/BaseTestCase.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/util/BaseTestCase.java
Thu Jul 20 16:49:23 2006
@@ -29,7 +29,7 @@
 /**
  * Base class for JUnit tests.
  */
-public class BaseTestCase
+public abstract class BaseTestCase
     extends TestCase {
 
     /**



Mime
View raw message