db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From g.@apache.org
Subject svn commit: r1870836 [2/3] - in /db/torque/torque4/trunk: ./ torque-test/ torque-test/src/test/java/org/apache/torque/ torque-test/src/test/java/org/apache/torque/adapter/ torque-test/src/test/java/org/apache/torque/avalon/ torque-test/src/test/java/or...
Date Wed, 04 Dec 2019 15:51:07 GMT
Modified: db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/generated/peer/DefaultValuesFromDatabaseTest.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/generated/peer/DefaultValuesFromDatabaseTest.java?rev=1870836&r1=1870835&r2=1870836&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/generated/peer/DefaultValuesFromDatabaseTest.java (original)
+++ db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/generated/peer/DefaultValuesFromDatabaseTest.java Wed Dec  4 15:51:06 2019
@@ -16,6 +16,7 @@ import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.torque.BaseDatabaseTestCase;
 import org.apache.torque.Torque;
+import org.apache.torque.adapter.Adapter;
 import org.apache.torque.adapter.DerbyAdapter;
 import org.apache.torque.adapter.HsqldbAdapter;
 import org.apache.torque.adapter.MssqlAdapter;
@@ -23,6 +24,7 @@ import org.apache.torque.adapter.MysqlAd
 import org.apache.torque.adapter.OracleAdapter;
 import org.apache.torque.adapter.PostgresAdapter;
 import org.apache.torque.criteria.Criteria;
+import org.apache.torque.junit5.extension.AdapterProvider;
 import org.apache.torque.test.dbobject.CurrentDateTable;
 import org.apache.torque.test.dbobject.CurrentTimeTable;
 import org.apache.torque.test.dbobject.CurrentTimestampTable;
@@ -33,6 +35,13 @@ import org.apache.torque.test.peer.Curre
 import org.apache.torque.test.peer.DatabaseDefaultValuesPeer;
 import org.apache.torque.util.ColumnValues;
 import org.apache.torque.util.JdbcTypedValue;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.params.provider.ArgumentsSource;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
 
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
@@ -69,6 +78,7 @@ public class DefaultValuesFromDatabaseTe
     /**
      * Checks the java default values.
      */
+    @Test
     public void testJavaDefault() throws Exception
     {
         DatabaseDefaultValues databaseDefaultValues
@@ -89,6 +99,7 @@ public class DefaultValuesFromDatabaseTe
      * Checks that the buildColumnValues for an unchanged object
      * does not contain the values with database default.
      */
+    @Test
     public void testGetColumnValuesNewUnchangedObject() throws Exception
     {
         DatabaseDefaultValues databaseDefaultValues
@@ -105,7 +116,8 @@ public class DefaultValuesFromDatabaseTe
     /**
      * Checks the values in the database if a new object is saved.
      */
-    public void testNewObjectDatabaseDefault() throws Exception
+    @ArgumentsSource(AdapterProvider.class)
+    public void testNewObjectDatabaseDefault(Adapter adapter) throws Exception
     {
         DatabaseDefaultValuesPeer.doDelete(new Criteria());
         DatabaseDefaultValues databaseDefaultValues
@@ -132,13 +144,13 @@ public class DefaultValuesFromDatabaseTe
         assertEquals(4, databaseDefaultValuesSaved.getPInt());
         assertEquals("Default!", databaseDefaultValuesSaved.getVarcharField());
         assertEquals(toString(doSelect(toDate("2010-09-08 00:00:00"),
-                java.sql.Date.class)),
+                java.sql.Date.class, adapter)),
                 toString(databaseDefaultValuesSaved.getDateField()));
         assertEquals(toString(doSelect(toDate("1970-01-01 10:20:30"),
-                java.sql.Time.class)),
+                java.sql.Time.class, adapter)),
                 toString(databaseDefaultValuesSaved.getTimeField()));
         assertEquals(toString(doSelect(toDate("2010-09-08 11:12:13"),
-                java.sql.Timestamp.class)),
+                java.sql.Timestamp.class, adapter)),
                 toString(databaseDefaultValuesSaved.getTimestampField()));
     }
 
@@ -146,7 +158,8 @@ public class DefaultValuesFromDatabaseTe
      * Tests that values are saved if they are not equal to the default value
      * on a new object.
      */
-    public void testNewObjectChangedValue() throws Exception
+    @Test
+    public void testNewObjectChangedValue(Adapter adapter) throws Exception
     {
         DatabaseDefaultValuesPeer.doDelete(new Criteria());
         DatabaseDefaultValues databaseDefaultValues
@@ -193,19 +206,20 @@ public class DefaultValuesFromDatabaseTe
         assertEquals(3, databaseDefaultValuesSaved.getPInt());
         assertEquals("Changed!", databaseDefaultValuesSaved.getVarcharField());
         assertEquals(toString(doSelect(toDate("2000-01-02 00:00:00"),
-                java.sql.Date.class)),
+                java.sql.Date.class, adapter)),
                 toString(databaseDefaultValuesSaved.getDateField()));
         assertEquals(toString(doSelect(toDate("1970-01-01 11:21:31"),
-                java.sql.Time.class)),
+                java.sql.Time.class, adapter)),
                 toString(databaseDefaultValuesSaved.getTimeField()));
         assertEquals(toString(doSelect(toDate("2010-09-08 12:13:14"),
-                java.sql.Timestamp.class)),
+                java.sql.Timestamp.class, adapter)),
                 toString(databaseDefaultValuesSaved.getTimestampField()));
     }
 
     /**
      * Checks the second save also saves unchanged values.
      */
+    @Test
     public void testNotNewObjectSavesUnchangedValues() throws Exception
     {
         DatabaseDefaultValuesPeer.doDelete(new Criteria());
@@ -264,18 +278,20 @@ public class DefaultValuesFromDatabaseTe
      *
      * @throws Exception if an error occurs.
      */
-    public void testCurrentDateAsDefault() throws Exception
+    @Test
+    @ArgumentsSource(AdapterProvider.class)
+    public void testCurrentDateAsDefault(Adapter adapter) throws Exception
     {
-        if (!canUseCurrentDateAsDefaultForDate())
+        if (!canUseCurrentDateAsDefaultForDate(adapter))
         {
             return;
         }
         CurrentDateTablePeer.doDelete(new Criteria());
         CurrentDateTable currentDate = new CurrentDateTable();
 
-        Date currentDateBefore = doSelect("CURRENT_DATE", java.sql.Date.class);
+        Date currentDateBefore = doSelect("CURRENT_DATE", java.sql.Date.class, adapter);
         currentDate.save();
-        Date currentDateAfter = doSelect("CURRENT_DATE", java.sql.Date.class);
+        Date currentDateAfter = doSelect("CURRENT_DATE", java.sql.Date.class, adapter);
 
         List<CurrentDateTable> dbStateList
         = CurrentDateTablePeer.doSelect(new Criteria());
@@ -295,24 +311,26 @@ public class DefaultValuesFromDatabaseTe
      *
      * @throws Exception if an error occurs.
      */
-    public void testCurrentTimeAsDefault() throws Exception
+    @Test
+    @ArgumentsSource(AdapterProvider.class)
+    public void testCurrentTimeAsDefault(Adapter adapter) throws Exception
     {
-        if (!canUseCurrentTimeAsDefaultForTime())
+        if (!canUseCurrentTimeAsDefaultForTime(adapter))
         {
             return;
         }
         CurrentTimeTablePeer.doDelete(new Criteria());
         CurrentTimeTable currentTime = new CurrentTimeTable();
 
-        Date currentDateBefore = doSelect("CURRENT_TIME", Time.class);
+        Date currentDateBefore = doSelect("CURRENT_TIME", Time.class, adapter);
         currentTime.save();
-        Date currentDateAfter = doSelect("CURRENT_TIME", Time.class);
+        Date currentDateAfter = doSelect("CURRENT_TIME", Time.class, adapter);
 
         List<CurrentTimeTable> dbStateList
         = CurrentTimeTablePeer.doSelect(new Criteria());
         assertEquals(1, dbStateList.size());
         CurrentTimeTable dbState = dbStateList.get(0);
-        if (timezoneBuggyInCurrentTime())
+        if (timezoneBuggyInCurrentTime(adapter))
         {
             return;
         }
@@ -329,19 +347,21 @@ public class DefaultValuesFromDatabaseTe
      * then the database saves the current date.
      *
      * @throws Exception if an error occurs.
-     */
-    public void testCurrentTimestampAsDefault() throws Exception
+     */ 
+    @Test
+    @ArgumentsSource(AdapterProvider.class)
+    public void testCurrentTimestampAsDefault(Adapter adapter) throws Exception
     {
-        if (!canUseCurrentTimestampAsDefaultForTimestamp())
+        if (!canUseCurrentTimestampAsDefaultForTimestamp(adapter))
         {
             return;
         }
         CurrentTimestampTablePeer.doDelete(new Criteria());
         CurrentTimestampTable currentTimestamp = new CurrentTimestampTable();
 
-        Date currentTimestampBefore = doSelect("CURRENT_TIMESTAMP", Timestamp.class);
+        Date currentTimestampBefore = doSelect("CURRENT_TIMESTAMP", Timestamp.class, adapter);
         currentTimestamp.save();
-        Date currentTimestampAfter = doSelect("CURRENT_TIMESTAMP", Timestamp.class);
+        Date currentTimestampAfter = doSelect("CURRENT_TIMESTAMP", Timestamp.class, adapter);
 
         List<CurrentTimestampTable> dbStateList
         = CurrentTimestampTablePeer.doSelect(new Criteria());
@@ -357,25 +377,25 @@ public class DefaultValuesFromDatabaseTe
                         currentTimestampAfter));
     }
 
-    private Date doSelect(final Date toSelect, final Class<?> classToSelect)
+    private Date doSelect(final Date toSelect, final Class<?> classToSelect, Adapter adapter)
             throws Exception
     {
         String dateFormat;
-        if (defaultAdapter instanceof OracleAdapter)
+        if (adapter instanceof OracleAdapter)
         {
             dateFormat = "'to_timestamp('''yyyy-MM-dd HH:mm:ss''',''yyyy-mm-dd hh24:mi:ss'')'";
         }
-        else if (defaultAdapter instanceof MysqlAdapter
+        else if (adapter instanceof MysqlAdapter
                 && (classToSelect == java.sql.Time.class))
         {
             dateFormat = "''HH:mm:ss''";
         }
-        else if (defaultAdapter instanceof MssqlAdapter)
+        else if (adapter instanceof MssqlAdapter)
         {
             dateFormat = "''yyyyMMdd HH:mm:ss''";
         }
-        else if (defaultAdapter instanceof HsqldbAdapter
-                || defaultAdapter instanceof DerbyAdapter)
+        else if (adapter instanceof HsqldbAdapter
+                || adapter instanceof DerbyAdapter)
         {
             if (classToSelect == java.sql.Date.class)
             {
@@ -395,26 +415,26 @@ public class DefaultValuesFromDatabaseTe
             dateFormat = "''yyyy-MM-dd HH:mm:ss''";
         }
         String dateString = new SimpleDateFormat(dateFormat).format(toSelect);
-        return doSelect(dateString, classToSelect);
+        return doSelect(dateString, classToSelect, adapter);
     }
 
-    private Date doSelect(final String toSelect, final Class<?> classToSelect)
+    private Date doSelect(final String toSelect, final Class<?> classToSelect, Adapter adapter)
             throws Exception
     {
         String sql;
-        if (defaultAdapter instanceof OracleAdapter)
+        if (adapter instanceof OracleAdapter)
         {
             sql = "select " + toSelect + " from dual";
         }
-        else if (defaultAdapter instanceof DerbyAdapter)
+        else if (adapter instanceof DerbyAdapter)
         {
             sql = "values(" + toSelect + ")";
         }
-        else if (defaultAdapter instanceof HsqldbAdapter)
+        else if (adapter instanceof HsqldbAdapter)
         {
             sql = "call " + toSelect;
         }
-        else if (defaultAdapter instanceof MssqlAdapter)
+        else if (adapter instanceof MssqlAdapter)
         {
             sql = "select convert(datetime," + toSelect +")";
         }
@@ -472,10 +492,10 @@ public class DefaultValuesFromDatabaseTe
         }
     }
 
-    private static boolean canUseCurrentDateAsDefaultForDate()
+    private static boolean canUseCurrentDateAsDefaultForDate(Adapter adapter)
     {
-        if (defaultAdapter instanceof MysqlAdapter
-                || defaultAdapter instanceof MssqlAdapter)
+        if (adapter instanceof MysqlAdapter
+                || adapter instanceof MssqlAdapter)
         {
             log.warn("canUseCurrentDateAsDefaultForDate(): "
                     + "CURRENT_DATE cannot be used as default value "
@@ -485,11 +505,11 @@ public class DefaultValuesFromDatabaseTe
         return true;
     }
 
-    private static boolean canUseCurrentTimeAsDefaultForTime()
+    private static boolean canUseCurrentTimeAsDefaultForTime(Adapter adapter)
     {
-        if (defaultAdapter instanceof MysqlAdapter
-                || defaultAdapter instanceof OracleAdapter
-                || defaultAdapter instanceof MssqlAdapter)
+        if (adapter instanceof MysqlAdapter
+                || adapter instanceof OracleAdapter
+                || adapter instanceof MssqlAdapter)
         {
             log.warn("canUseCurrentTimeAsDefaultForTime(): "
                     + "CURRENT_TIME cannot be used as default value "
@@ -499,9 +519,9 @@ public class DefaultValuesFromDatabaseTe
         return true;
     }
 
-    private static boolean canUseCurrentTimestampAsDefaultForTimestamp()
+    private static boolean canUseCurrentTimestampAsDefaultForTimestamp(Adapter adapter)
     {
-        if (defaultAdapter instanceof MysqlAdapter)
+        if (adapter instanceof MysqlAdapter)
         {
             log.warn("canUseCurrentDateAsDefaultForDate(): "
                     + "CURRENT_TIMESTAMP cannot be used as default value "
@@ -511,9 +531,9 @@ public class DefaultValuesFromDatabaseTe
         return true;
     }
 
-    private static boolean timezoneBuggyInCurrentTime()
+    private static boolean timezoneBuggyInCurrentTime(Adapter adapter)
     {
-        if (defaultAdapter instanceof PostgresAdapter)
+        if (adapter instanceof PostgresAdapter)
         {
             log.warn("Timezone is buggy in CURRENT_TIME in Postgres");
             return true;

Modified: db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/generated/peer/DefaultValuesFromJavaTest.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/generated/peer/DefaultValuesFromJavaTest.java?rev=1870836&r1=1870835&r2=1870836&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/generated/peer/DefaultValuesFromJavaTest.java (original)
+++ db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/generated/peer/DefaultValuesFromJavaTest.java Wed Dec  4 15:51:06 2019
@@ -8,10 +8,19 @@ import java.util.TimeZone;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.torque.BaseDatabaseTestCase;
+import org.apache.torque.adapter.Adapter;
 import org.apache.torque.adapter.MssqlAdapter;
 import org.apache.torque.adapter.MysqlAdapter;
 import org.apache.torque.adapter.OracleAdapter;
+import org.apache.torque.junit5.extension.AdapterProvider;
 import org.apache.torque.test.dbobject.JavaDefaultValues;
+import org.junit.jupiter.params.provider.ArgumentsSource;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+import static org.junit.Assert.assertNull;
 
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
@@ -50,10 +59,11 @@ public class DefaultValuesFromJavaTest e
      *
      * @throws Exception if an error occurs.
      */
-    public void testCurrentDateAsJavaDefault() throws Exception
+    @ArgumentsSource(AdapterProvider.class)
+    public void testCurrentDateAsJavaDefault(Adapter adapter) throws Exception
     {
-        if (defaultAdapter instanceof MssqlAdapter
-                || defaultAdapter instanceof MysqlAdapter)
+        if (adapter instanceof MssqlAdapter
+                || adapter instanceof MysqlAdapter)
         {
             log.error("testCurrentDateAsJavaDefault(): "
                     + "MSSQL and Mysql do not support the CURRENT_DATE function");
@@ -99,11 +109,12 @@ public class DefaultValuesFromJavaTest e
      *
      * @throws Exception if an error occurs.
      */
-    public void testCurrentTimeAsJavaDefault() throws Exception
+    @ArgumentsSource(AdapterProvider.class)
+    public void testCurrentTimeAsJavaDefault(Adapter adapter) throws Exception
     {
-        if (defaultAdapter instanceof OracleAdapter
-                || defaultAdapter instanceof MssqlAdapter
-                || defaultAdapter instanceof MysqlAdapter)
+        if (adapter instanceof OracleAdapter
+                || adapter instanceof MssqlAdapter
+                || adapter instanceof MysqlAdapter)
         {
             log.error("testCurrentTimeAsJavaDefault(): "
                     + "Oracle, MSSQL and Mysql do not support "
@@ -137,9 +148,10 @@ public class DefaultValuesFromJavaTest e
      *
      * @throws Exception if an error occurs.
      */
-    public void testCurrentTimestampAsJavaDefault() throws Exception
+    @ArgumentsSource(AdapterProvider.class)
+    public void testCurrentTimestampAsJavaDefault(Adapter adapter) throws Exception
     {
-        if (defaultAdapter instanceof MysqlAdapter)
+        if (adapter instanceof MysqlAdapter)
         {
             log.error("testCurrentTimestampAsJavaDefault(): "
                     + "Mysql does not support "

Modified: db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/generated/peer/DeleteTest.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/generated/peer/DeleteTest.java?rev=1870836&r1=1870835&r2=1870836&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/generated/peer/DeleteTest.java (original)
+++ db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/generated/peer/DeleteTest.java Wed Dec  4 15:51:06 2019
@@ -39,6 +39,12 @@ import org.apache.torque.test.peer.NopkP
 import org.apache.torque.test.peer.NullableOIntegerFkPeer;
 import org.apache.torque.test.peer.OIntegerPkPeer;
 
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+import static org.junit.Assert.assertNull;
+
 /**
  * Tests the delete methods in the generated Peer classes.
  *

Modified: db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/generated/peer/DoInsertTest.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/generated/peer/DoInsertTest.java?rev=1870836&r1=1870835&r2=1870836&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/generated/peer/DoInsertTest.java (original)
+++ db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/generated/peer/DoInsertTest.java Wed Dec  4 15:51:06 2019
@@ -28,9 +28,11 @@ import org.apache.commons.logging.LogFac
 import org.apache.torque.BaseDatabaseTestCase;
 import org.apache.torque.Column;
 import org.apache.torque.ColumnImpl;
+import org.apache.torque.adapter.Adapter;
 import org.apache.torque.adapter.IDMethod;
 import org.apache.torque.adapter.MssqlAdapter;
 import org.apache.torque.criteria.Criteria;
+import org.apache.torque.junit5.extension.AdapterProvider;
 import org.apache.torque.om.ObjectKey;
 import org.apache.torque.test.dbobject.Author;
 import org.apache.torque.test.dbobject.Book;
@@ -40,6 +42,14 @@ import org.apache.torque.test.peer.BookP
 import org.apache.torque.test.peer.IntegerTypePeer;
 import org.apache.torque.util.ColumnValues;
 import org.apache.torque.util.JdbcTypedValue;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.params.provider.ArgumentsSource;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+import static org.junit.Assert.assertNotNull;
 
 /**
  * Tests the doInsert Methods in the Peer classes.
@@ -52,10 +62,10 @@ public class DoInsertTest extends BaseDa
 
     private static Log log =LogFactory.getLog(DoInsertTest.class);
 
-    @Override
+    @BeforeEach
     public void setUp() throws Exception
     {
-        super.setUp();
+       
         cleanBookstore();
         authorList = insertBookstoreData();
     }
@@ -147,10 +157,11 @@ public class DoInsertTest extends BaseDa
      *
      * @throws Exception if a database error occurs.
      */
-    public void testDoInsertWithSelectSingleRecordIdSet()
+    @ArgumentsSource(AdapterProvider.class)
+    public void testDoInsertWithSelectSingleRecordIdSet(Adapter adapter)
             throws Exception
     {
-        if (defaultAdapter instanceof MssqlAdapter)
+        if (adapter instanceof MssqlAdapter)
         {
             log.warn("testDoInsertWithSelectSingleRecordIdSet(): "
                     + "Setting explicit Ids is not (easily) supported by MSSQL");

Modified: db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/generated/peer/DoUpdateTest.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/generated/peer/DoUpdateTest.java?rev=1870836&r1=1870835&r2=1870836&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/generated/peer/DoUpdateTest.java (original)
+++ db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/generated/peer/DoUpdateTest.java Wed Dec  4 15:51:06 2019
@@ -1,5 +1,7 @@
 package org.apache.torque.generated.peer;
 
+import static org.junit.Assert.assertEquals;
+
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -31,7 +33,16 @@ import org.apache.torque.test.peer.Autho
 import org.apache.torque.test.peer.IntegerTypePeer;
 import org.apache.torque.util.ColumnValues;
 import org.apache.torque.util.JdbcTypedValue;
+import org.junit.jupiter.api.BeforeEach;
 
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNotSame;
+import static org.junit.Assert.assertSame;
+import static org.junit.Assert.assertNull;
 /**
  * Tests the doUpdate Methods in the Peer classes.
  *
@@ -41,10 +52,10 @@ public class DoUpdateTest extends BaseDa
 {
     private List<Author> authorList;
 
-    @Override
+
+    @BeforeEach
     public void setUp() throws Exception
     {
-        super.setUp();
         cleanBookstore();
         authorList = insertBookstoreData();
     }

Modified: db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/generated/peer/ExecuteStatementsTest.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/generated/peer/ExecuteStatementsTest.java?rev=1870836&r1=1870835&r2=1870836&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/generated/peer/ExecuteStatementsTest.java (original)
+++ db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/generated/peer/ExecuteStatementsTest.java Wed Dec  4 15:51:06 2019
@@ -28,6 +28,14 @@ import org.apache.torque.BaseDatabaseTes
 import org.apache.torque.test.dbobject.Author;
 import org.apache.torque.test.peer.AuthorPeer;
 import org.apache.torque.util.JdbcTypedValue;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+import static org.junit.Assert.assertNull;
 
 /**
  * Tests executeStatement calls.
@@ -38,10 +46,9 @@ public class ExecuteStatementsTest exten
 {
     private List<Author> authorList;
 
-    @Override
+    @BeforeEach
     public void setUp() throws Exception
     {
-        super.setUp();
         cleanBookstore();
         authorList = insertBookstoreData();
     }
@@ -51,6 +58,7 @@ public class ExecuteStatementsTest exten
      *
      * @throws Exception if the test fails
      */
+    @Test
     public void testExecuteStatementWithStringReplacements() throws Exception
     {
         Map<String, JdbcTypedValue> replacements = new HashMap<>();

Modified: db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/generated/peer/FillerTest.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/generated/peer/FillerTest.java?rev=1870836&r1=1870835&r2=1870836&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/generated/peer/FillerTest.java (original)
+++ db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/generated/peer/FillerTest.java Wed Dec  4 15:51:06 2019
@@ -41,6 +41,16 @@ import org.apache.torque.test.peer.Nulla
 import org.apache.torque.test.peer.OIntegerPkPeer;
 import org.apache.torque.test.peer.PIntegerPkPeer;
 import org.apache.torque.test.peer.RequiredPIntegerFkPeer;
+import org.junit.jupiter.api.Test;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNotSame;
+import static org.junit.Assert.assertSame;
+import static org.junit.Assert.assertNull;
 
 /**
  * Tests the filler methods in the generated Peer classes.
@@ -63,6 +73,7 @@ public class FillerTest extends BaseData
      *
      * @throws Exception if a database error occurs.
      */
+    @Test
     public void testFillReferencedPrimitiveIntegerKey() throws Exception
     {
         ForeignKeySchemaData.clearTablesInDatabase();
@@ -149,6 +160,7 @@ public class FillerTest extends BaseData
      *
      * @throws Exception if a database error occurs.
      */
+    @Test
     public void testFillReferencedObjectIntegerKey() throws Exception
     {
         ForeignKeySchemaData.clearTablesInDatabase();
@@ -223,6 +235,7 @@ public class FillerTest extends BaseData
      *
      * @throws Exception if a database error occurs.
      */
+    @Test
     public void testFillReferencedNonPrimaryKey() throws Exception
     {
         ForeignKeySchemaData.clearTablesInDatabase();
@@ -296,6 +309,7 @@ public class FillerTest extends BaseData
      *
      * @throws Exception if a database error occurs.
      */
+    @Test
     public void testFillReferencedDuplicateObjects() throws Exception
     {
         ForeignKeySchemaData.clearTablesInDatabase();
@@ -361,6 +375,7 @@ public class FillerTest extends BaseData
      *
      * @throws Exception if a database error occurs.
      */
+    @Test
     public void testFillReferencedAlreadySet() throws Exception
     {
         ForeignKeySchemaData.clearTablesInDatabase();
@@ -392,6 +407,7 @@ public class FillerTest extends BaseData
      *
      * @throws Exception if a database error occurs.
      */
+    @Test
     public void testFillReferencedCompositeKey() throws Exception
     {
         ForeignKeySchemaData.clearTablesInDatabase();
@@ -469,6 +485,7 @@ public class FillerTest extends BaseData
      *
      * @throws Exception if a database error occurs.
      */
+    @Test
     public void testFillReferencedNonPrimaryCompositeKey() throws Exception
     {
         ForeignKeySchemaData.clearTablesInDatabase();
@@ -542,6 +559,7 @@ public class FillerTest extends BaseData
      * Tests that the fill method overwrites a referenced object with the
      * current database state.
      */
+    @Test
     public void testFillReferencedObjectRefill() throws Exception
     {
         ForeignKeySchemaData.clearTablesInDatabase();
@@ -581,6 +599,7 @@ public class FillerTest extends BaseData
      *
      * @throws Exception if a database error occurs.
      */
+    @Test
     public void testFillReferencedChunkSizeMinus1() throws Exception
     {
         ForeignKeySchemaData.clearTablesInDatabase();
@@ -654,6 +673,7 @@ public class FillerTest extends BaseData
      * Tests that the fill method for referenced objects works for many rows
      * in the database.
      */
+    @Test
     public void testFillReferencedManyRecords() throws Exception
     {
         ForeignKeySchemaData.clearTablesInDatabase();
@@ -725,6 +745,7 @@ public class FillerTest extends BaseData
      *
      * @throws Exception if a database error occurs.
      */
+    @Test
     public void testFillReferencingPrimitiveIntegerKey() throws Exception
     {
         ForeignKeySchemaData.clearTablesInDatabase();
@@ -814,6 +835,7 @@ public class FillerTest extends BaseData
      *
      * @throws Exception if a database error occurs.
      */
+    @Test
     public void testFillReferencingObjectIntegerKey() throws Exception
     {
         ForeignKeySchemaData.clearTablesInDatabase();
@@ -887,6 +909,7 @@ public class FillerTest extends BaseData
      *
      * @throws Exception if a database error occurs.
      */
+    @Test
     public void testFillReferencingDuplicateObjects() throws Exception
     {
         ForeignKeySchemaData.clearTablesInDatabase();
@@ -953,6 +976,7 @@ public class FillerTest extends BaseData
      *
      * @throws Exception if a database error occurs.
      */
+    @Test
     public void testFillReferencingNonPrimaryKey() throws Exception
     {
         ForeignKeySchemaData.clearTablesInDatabase();
@@ -1027,6 +1051,7 @@ public class FillerTest extends BaseData
      *
      * @throws Exception if a database error occurs.
      */
+    @Test
     public void testFillReferencingCompositeKey() throws Exception
     {
         ForeignKeySchemaData.clearTablesInDatabase();
@@ -1104,6 +1129,7 @@ public class FillerTest extends BaseData
      *
      * @throws Exception if a database error occurs.
      */
+    @Test
     public void testFillReferencingNonPrimaryCompositeKey() throws Exception
     {
         ForeignKeySchemaData.clearTablesInDatabase();
@@ -1176,6 +1202,7 @@ public class FillerTest extends BaseData
      * Tests that the fill method overwrites the referencing object collection
      * with the current database state.
      */
+    @Test
     public void testReferencingObjectRefill() throws TorqueException
     {
         ForeignKeySchemaData.clearTablesInDatabase();
@@ -1216,6 +1243,7 @@ public class FillerTest extends BaseData
     /**
      * Tests that the chunk size -1 works for referencing objects.
      */
+    @Test
     public void testReferencingObjectChunkSizeMinusOne() throws TorqueException
     {
         ForeignKeySchemaData.clearTablesInDatabase();
@@ -1291,6 +1319,7 @@ public class FillerTest extends BaseData
      * Tests that the fill method for referencing objects works for many rows
      * in the database.
      */
+    @Test
     public void testFillReferencingManyRecords() throws TorqueException
     {
         ForeignKeySchemaData.clearTablesInDatabase();

Modified: db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/generated/peer/GroupByTest.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/generated/peer/GroupByTest.java?rev=1870836&r1=1870835&r2=1870836&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/generated/peer/GroupByTest.java (original)
+++ db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/generated/peer/GroupByTest.java Wed Dec  4 15:51:06 2019
@@ -31,6 +31,15 @@ import org.apache.torque.test.dbobject.A
 import org.apache.torque.test.dbobject.Book;
 import org.apache.torque.test.peer.BookPeer;
 import org.apache.torque.util.functions.Max;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNotSame;
 
 /**
  * Tests Group by statements.
@@ -41,10 +50,9 @@ public class GroupByTest extends BaseDat
 {
     private List<Author> authorList;
 
-    @Override
+    @BeforeEach
     public void setUp() throws Exception
     {
-        super.setUp();
         cleanBookstore();
         authorList = insertBookstoreData();
     }
@@ -54,6 +62,7 @@ public class GroupByTest extends BaseDat
      *
      * @throws Exception if the test fails
      */
+    @Test
     public void testAddGroupByColumn() throws Exception
     {
         Criteria criteria = new Criteria()
@@ -84,6 +93,7 @@ public class GroupByTest extends BaseDat
      *
      * @throws Exception if the test fails
      */
+    @Test
     public void testAddGroupByColumnNotInSelectClause() throws Exception
     {
         Criteria criteria = new Criteria()

Modified: db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/generated/peer/ImplInitialisationTest.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/generated/peer/ImplInitialisationTest.java?rev=1870836&r1=1870835&r2=1870836&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/generated/peer/ImplInitialisationTest.java (original)
+++ db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/generated/peer/ImplInitialisationTest.java Wed Dec  4 15:51:06 2019
@@ -23,6 +23,13 @@ import org.apache.torque.BaseDatabaseTes
 import org.apache.torque.test.peer.AuthorPeer;
 import org.apache.torque.test.peer.AuthorPeerImpl;
 import org.apache.torque.test.recordmapper.AuthorRecordMapper;
+import org.junit.jupiter.api.Test;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+import static org.junit.Assert.assertNull;
 
 /**
  * Tests the peerImpl initialisation.
@@ -36,6 +43,7 @@ public class ImplInitialisationTest exte
      *
      * @throws Exception if a database error occurs.
      */
+    @Test
     public void testNoArgConstructor() throws Exception
     {
         AuthorPeerImpl authorPeerImpl= new AuthorPeerImpl();

Modified: db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/generated/peer/JoinTest.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/generated/peer/JoinTest.java?rev=1870836&r1=1870835&r2=1870836&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/generated/peer/JoinTest.java (original)
+++ db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/generated/peer/JoinTest.java Wed Dec  4 15:51:06 2019
@@ -27,9 +27,11 @@ import org.apache.torque.BaseDatabaseTes
 import org.apache.torque.ColumnImpl;
 import org.apache.torque.ForeignKeySchemaData;
 import org.apache.torque.TorqueException;
+import org.apache.torque.adapter.Adapter;
 import org.apache.torque.adapter.HsqldbAdapter;
 import org.apache.torque.criteria.Criteria;
 import org.apache.torque.criteria.Criterion;
+import org.apache.torque.junit5.extension.AdapterProvider;
 import org.apache.torque.test.dbobject.Author;
 import org.apache.torque.test.dbobject.Book;
 import org.apache.torque.test.dbobject.MultiRef;
@@ -40,6 +42,14 @@ import org.apache.torque.test.peer.Autho
 import org.apache.torque.test.peer.BookPeer;
 import org.apache.torque.test.peer.MultiRefPeer;
 import org.apache.torque.test.peer.OIntegerPkPeer;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.params.provider.ArgumentsSource;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+import static org.junit.Assert.assertNull;
 
 /**
  * Tests joins.
@@ -55,6 +65,7 @@ public class JoinTest extends BaseDataba
      *
      * @throws Exception if the test fails
      */
+    @Test
     public void testLeftJoins() throws Exception
     {
         cleanBookstore();
@@ -84,6 +95,7 @@ public class JoinTest extends BaseDataba
      *
      * @throws Exception if the test fails
      */
+    @Test
     public void testInnerJoins() throws Exception
     {
         cleanBookstore();
@@ -113,6 +125,7 @@ public class JoinTest extends BaseDataba
      *
      * @throws Exception if the test fails
      */
+    @Test
     public void testImplicitInnerJoins() throws Exception
     {
         cleanBookstore();
@@ -141,9 +154,11 @@ public class JoinTest extends BaseDataba
      *
      * @throws Exception if the test fails
      */
-    public void testRightJoins() throws Exception
+    @Test
+    @ArgumentsSource(AdapterProvider.class)
+    public void testRightJoins(Adapter adapter) throws Exception
     {
-        if (!supportsRightJoins())
+        if (!supportsRightJoins(adapter))
         {
             return;
         }
@@ -175,6 +190,7 @@ public class JoinTest extends BaseDataba
      *
      * @throws Exception if the test fails
      */
+    @Test
     public void testInnerJoinsOtherComparator() throws Exception
     {
         cleanBookstore();
@@ -209,9 +225,11 @@ public class JoinTest extends BaseDataba
      *
      * @throws Exception if the test fails
      */
-    public void testDoubleJoinWithAliases() throws Exception
+    @Test
+    @ArgumentsSource(AdapterProvider.class)
+    public void testDoubleJoinWithAliases(Adapter adapter) throws Exception
     {
-        if (!supportsRightJoins())
+        if (!supportsRightJoins(adapter))
         {
             return;
         }
@@ -247,9 +265,11 @@ public class JoinTest extends BaseDataba
      *
      * @throws Exception if the test fails
      */
-    public void testReverseJoin() throws Exception
+    @Test
+    @ArgumentsSource(AdapterProvider.class)
+    public void testReverseJoin(Adapter adapter) throws Exception
     {
-        if (!supportsRightJoins())
+        if (!supportsRightJoins(adapter))
         {
             return;
         }
@@ -286,9 +306,11 @@ public class JoinTest extends BaseDataba
      *
      * @throws Exception if the test fails
      */
-    public void testImplicitInnerJoinWithSubselect() throws Exception
+    @Test
+    @ArgumentsSource(AdapterProvider.class)
+    public void testImplicitInnerJoinWithSubselect(Adapter adapter) throws Exception
     {
-        if (!supportsRightJoins())
+        if (!supportsRightJoins(adapter))
         {
             return;
         }
@@ -327,6 +349,7 @@ public class JoinTest extends BaseDataba
      *
      * @throws Exception if the test fails.
      */
+    @Test
     public void testImplicitInnerJoinTwoConditions() throws Exception
     {
         cleanBookstore();
@@ -360,6 +383,7 @@ public class JoinTest extends BaseDataba
      *
      * @throws Exception if the test fails.
      */
+    @Test
     public void testExplicitInnerJoinTwoConditions() throws Exception
     {
         cleanBookstore();
@@ -391,6 +415,7 @@ public class JoinTest extends BaseDataba
      * Test joins using the XPeer.DoSelectJoinYYY methods
      * @throws Exception if the Test fails
      */
+    @Test
     public void testDoSelectJoinY() throws Exception
     {
         cleanBookstore();
@@ -414,6 +439,7 @@ public class JoinTest extends BaseDataba
      * Test joins using the XPeer.DoSelectJoinAllExceptYYY methods
      * @throws Exception if the Test fails
      */
+    @Test
     public void testDoSelectJoinAllExceptY() throws Exception
     {
         ForeignKeySchemaData.clearTablesInDatabase();
@@ -524,9 +550,9 @@ public class JoinTest extends BaseDataba
      *
      * @throws TorqueException if an error occurs.
      */
-    protected boolean supportsRightJoins() throws TorqueException
+    protected boolean supportsRightJoins(Adapter adapter) throws TorqueException
     {
-        if (defaultAdapter instanceof HsqldbAdapter)
+        if (adapter instanceof HsqldbAdapter)
         {
             log.warn("testRightJoins(): "
                     + "Right joins are not supported by HSQLDB");

Modified: db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/generated/peer/OptimisticLockingSelectForUpdateTest.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/generated/peer/OptimisticLockingSelectForUpdateTest.java?rev=1870836&r1=1870835&r2=1870836&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/generated/peer/OptimisticLockingSelectForUpdateTest.java (original)
+++ db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/generated/peer/OptimisticLockingSelectForUpdateTest.java Wed Dec  4 15:51:06 2019
@@ -25,6 +25,12 @@ import org.apache.torque.TorqueException
 import org.apache.torque.test.dbobject.OptimisticLocking;
 import org.apache.torque.test.peer.OptimisticLockingPeerImpl;
 
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+import static org.junit.Assert.assertNull;
+
 /**
  * Tests whether optimistic locking with select for update works.
  *

Modified: db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/generated/peer/OptimisticLockingSimpleSelectTest.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/generated/peer/OptimisticLockingSimpleSelectTest.java?rev=1870836&r1=1870835&r2=1870836&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/generated/peer/OptimisticLockingSimpleSelectTest.java (original)
+++ db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/generated/peer/OptimisticLockingSimpleSelectTest.java Wed Dec  4 15:51:06 2019
@@ -24,6 +24,12 @@ import org.apache.torque.TorqueException
 import org.apache.torque.test.dbobject.OptimisticLockingSimple;
 import org.apache.torque.test.peer.OptimisticLockingSimplePeerImpl;
 
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+import static org.junit.Assert.assertNull;
+
 /**
  * Tests whether optimistic locking with select for update works.
  *

Modified: db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/generated/peer/QualifiedTableNameTest.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/generated/peer/QualifiedTableNameTest.java?rev=1870836&r1=1870835&r2=1870836&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/generated/peer/QualifiedTableNameTest.java (original)
+++ db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/generated/peer/QualifiedTableNameTest.java Wed Dec  4 15:51:06 2019
@@ -26,6 +26,14 @@ import org.apache.torque.Torque;
 import org.apache.torque.criteria.Criteria;
 import org.apache.torque.test.dbobject.QualifiedName;
 import org.apache.torque.test.peer.QualifiedNamePeer;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+import static org.junit.Assert.assertNull;
 
 /**
  * Tests that accessing the database also works if the table name is qualified
@@ -39,10 +47,9 @@ public class QualifiedTableNameTest exte
     QualifiedName qualifiedName2;
     QualifiedName qualifiedName3;
 
-    @Override
+    @BeforeEach
     public void setUp() throws Exception
     {
-        super.setUp();
         QualifiedNamePeer.doDelete(new Criteria());
         qualifiedName1 = new QualifiedName();
         qualifiedName1.setPayload("qualifiedName1");
@@ -60,6 +67,7 @@ public class QualifiedTableNameTest exte
      *
      * @throws Exception if an error occurs
      */
+    @Test
     public void testRead() throws Exception
     {
         // prepare
@@ -81,6 +89,7 @@ public class QualifiedTableNameTest exte
      *
      * @throws Exception if an error occurs
      */
+    @Test
     public void testReadWithSort() throws Exception
     {
         // prepare
@@ -103,6 +112,7 @@ public class QualifiedTableNameTest exte
      *
      * @throws Exception if an error occurs
      */
+    @Test
     public void testUpdate() throws Exception
     {
         // prepare
@@ -128,6 +138,7 @@ public class QualifiedTableNameTest exte
      *
      * @throws Exception if an error occurs
      */
+    @Test
     public void testDelete() throws Exception
     {
         // execute
@@ -146,6 +157,7 @@ public class QualifiedTableNameTest exte
      *
      * @throws Exception if an error occurs
      */
+    @Test
     public void testTableNameInPeer() throws Exception
     {
         // verify
@@ -158,6 +170,7 @@ public class QualifiedTableNameTest exte
      *
      * @throws Exception if an error occurs
      */
+    @Test
     public void testSchemaNameInPeer() throws Exception
     {
         // prepare

Modified: db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/generated/peer/RetrieveByPkTest.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/generated/peer/RetrieveByPkTest.java?rev=1870836&r1=1870835&r2=1870836&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/generated/peer/RetrieveByPkTest.java (original)
+++ db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/generated/peer/RetrieveByPkTest.java Wed Dec  4 15:51:06 2019
@@ -32,6 +32,14 @@ import org.apache.torque.om.SimpleKey;
 import org.apache.torque.test.dbobject.Author;
 import org.apache.torque.test.peer.AuthorPeer;
 import org.apache.torque.test.peer.MultiPkPeer;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+import static org.junit.Assert.assertNull;
 
 /**
  * Tests the retrieveByPk methods.
@@ -42,10 +50,10 @@ public class RetrieveByPkTest extends Ba
 {
     private List<Author> authorList;
 
-    @Override
+    @BeforeEach
     public void setUp() throws Exception
     {
-        super.setUp();
+       
         cleanBookstore();
         authorList = insertBookstoreData();
     }
@@ -55,6 +63,7 @@ public class RetrieveByPkTest extends Ba
      *
      * @throws Exception if the test fails
      */
+    @Test
     public void testRetrieveByPk() throws Exception
     {
         ObjectKey<?> primaryKey = authorList.get(1).getPrimaryKey();
@@ -72,6 +81,7 @@ public class RetrieveByPkTest extends Ba
      *
      * @throws Exception if the test fails
      */
+    @Test
     public void testRetrieveByNonExistingPk() throws Exception
     {
         ObjectKey<?> primaryKey = new NumberKey(-1);
@@ -91,6 +101,7 @@ public class RetrieveByPkTest extends Ba
      *
      * @throws Exception if the test fails
      */
+    @Test
     public void testRetrieveByNonExistingPkMultiplePKs() throws Exception
     {
         try
@@ -108,6 +119,7 @@ public class RetrieveByPkTest extends Ba
      *
      * @throws Exception if the test fails
      */
+    @Test
     public void testRetrieveByNullValuePk() throws Exception
     {
         ObjectKey<?> primaryKey = new NumberKey((BigDecimal) null);
@@ -126,6 +138,7 @@ public class RetrieveByPkTest extends Ba
      *
      * @throws Exception if the test fails
      */
+    @Test
     public void testRetrieveByNullPk() throws Exception
     {
         try
@@ -144,6 +157,7 @@ public class RetrieveByPkTest extends Ba
      *
      * @throws Exception if the test fails
      */
+    @Test
     public void testRetrieveByObjectKeys() throws Exception
     {
         List<ObjectKey<?>> objectKeys = new ArrayList<>();
@@ -162,6 +176,7 @@ public class RetrieveByPkTest extends Ba
      *
      * @throws Exception if the test fails
      */
+    @Test
     public void testRetrieveByTypedKeys() throws Exception
     {
         List<Integer> typedKeys = new ArrayList<>();

Modified: db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/generated/peer/SaveMethodsInPeerTest.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/generated/peer/SaveMethodsInPeerTest.java?rev=1870836&r1=1870835&r2=1870836&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/generated/peer/SaveMethodsInPeerTest.java (original)
+++ db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/generated/peer/SaveMethodsInPeerTest.java Wed Dec  4 15:51:06 2019
@@ -31,6 +31,12 @@ import org.apache.torque.test.peer.SaveM
 import org.apache.torque.test.peer.SaveMethodInPeerPeer;
 import org.apache.torque.util.CountHelper;
 
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+import static org.junit.Assert.assertNotNull;
+
 /**
  * Tests whether the save methods work in the peer classes.
  *

Modified: db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/generated/peer/SelectFunctionTest.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/generated/peer/SelectFunctionTest.java?rev=1870836&r1=1870835&r2=1870836&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/generated/peer/SelectFunctionTest.java (original)
+++ db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/generated/peer/SelectFunctionTest.java Wed Dec  4 15:51:06 2019
@@ -30,6 +30,13 @@ import org.apache.torque.util.functions.
 import org.apache.torque.util.functions.Max;
 import org.apache.torque.util.functions.Min;
 import org.apache.torque.util.functions.Sum;
+import org.junit.jupiter.api.BeforeEach;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+import static org.junit.Assert.assertNotNull;
 
 /**
  * Tests selects using functions.
@@ -44,11 +51,9 @@ public class SelectFunctionTest extends
 
     private BasePeerImpl<Integer> peer;
 
-    @Override
+    @BeforeEach
     public void setUp() throws Exception
     {
-        super.setUp();
-
         // Clean up any previous failures
         Summarize1Peer.doDelete(new Criteria());
 

Modified: db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/generated/peer/SelectInTest.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/generated/peer/SelectInTest.java?rev=1870836&r1=1870835&r2=1870836&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/generated/peer/SelectInTest.java (original)
+++ db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/generated/peer/SelectInTest.java Wed Dec  4 15:51:06 2019
@@ -28,6 +28,14 @@ import org.apache.torque.test.dbobject.A
 import org.apache.torque.test.dbobject.Book;
 import org.apache.torque.test.peer.AuthorPeer;
 import org.apache.torque.test.peer.BookPeer;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+import static org.junit.Assert.assertNotNull;
 
 /**
  * Tests selects using the IN operator.
@@ -38,10 +46,9 @@ public class SelectInTest extends BaseDa
 {
     private List<Author> authorList;
 
-    @Override
+    @BeforeEach
     public void setUp() throws Exception
     {
-        super.setUp();
         cleanBookstore();
         authorList = insertBookstoreData();
     }
@@ -51,6 +58,7 @@ public class SelectInTest extends BaseDa
      *
      * @throws Exception if the test fails
      */
+    @Test
     public void testInWithStringListNoIgnoreCase() throws Exception
     {
         Criteria criteria = new Criteria();
@@ -85,6 +93,7 @@ public class SelectInTest extends BaseDa
      *
      * @throws Exception if the test fails
      */
+    @Test
     public void testInWithIntegerListNoIgnoreCase() throws Exception
     {
         Criteria criteria = new Criteria();
@@ -119,6 +128,7 @@ public class SelectInTest extends BaseDa
      *
      * @throws Exception if the test fails
      */
+    @Test
     public void testInWithStringListAndNullValue() throws Exception
     {
         Criteria criteria = new Criteria();
@@ -153,6 +163,7 @@ public class SelectInTest extends BaseDa
      *
      * @throws Exception if the test fails
      */
+    @Test
     public void testInWithStringArrayIgnoreCaseFalse() throws Exception
     {
         Criteria criteria = new Criteria();
@@ -185,6 +196,7 @@ public class SelectInTest extends BaseDa
      *
      * @throws Exception if the test fails
      */
+    @Test
     public void testInWithStringListIgnoreCaseTrue() throws Exception
     {
         Criteria criteria = new Criteria();
@@ -220,6 +232,7 @@ public class SelectInTest extends BaseDa
      *
      * @throws Exception if the test fails
      */
+    @Test
     public void testInWithIntegerListIgnoreCaseTrue() throws Exception
     {
         Criteria criteria = new Criteria();

Modified: db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/generated/peer/SelectSetOperationTest.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/generated/peer/SelectSetOperationTest.java?rev=1870836&r1=1870835&r2=1870836&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/generated/peer/SelectSetOperationTest.java (original)
+++ db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/generated/peer/SelectSetOperationTest.java Wed Dec  4 15:51:06 2019
@@ -30,15 +30,26 @@ import org.apache.commons.logging.LogFac
 import org.apache.torque.BaseDatabaseTestCase;
 import org.apache.torque.ColumnImpl;
 import org.apache.torque.TorqueException;
+import org.apache.torque.adapter.Adapter;
 import org.apache.torque.adapter.MssqlAdapter;
 import org.apache.torque.adapter.MysqlAdapter;
 import org.apache.torque.adapter.OracleAdapter;
 import org.apache.torque.criteria.Criteria;
+import org.apache.torque.junit5.extension.AdapterProvider;
 import org.apache.torque.om.mapper.IntegerMapper;
 import org.apache.torque.test.dbobject.Author;
 import org.apache.torque.test.dbobject.Book;
 import org.apache.torque.test.peer.AuthorPeer;
 import org.apache.torque.test.peer.BookPeer;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.params.provider.ArgumentsSource;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+import static org.junit.Assert.assertNotNull;
 
 /**
  * Tests simple selects.
@@ -51,10 +62,9 @@ public class SelectSetOperationTest exte
 
     private List<Author> authorList;
 
-    @Override
+    @BeforeEach
     public void setUp() throws Exception
     {
-        super.setUp();
         cleanBookstore();
         authorList = insertBookstoreData();
     }
@@ -64,6 +74,7 @@ public class SelectSetOperationTest exte
      *
      * @throws Exception if the test fails
      */
+    @Test
     public void testUnion() throws Exception
     {
         Criteria criteria = new Criteria()
@@ -93,6 +104,7 @@ public class SelectSetOperationTest exte
      *
      * @throws Exception if the test fails
      */
+    @Test
     public void testUnionAll() throws Exception
     {
         Criteria criteria = new Criteria()
@@ -131,9 +143,11 @@ public class SelectSetOperationTest exte
      *
      * @throws Exception if the test fails
      */
-    public void testExcept() throws Exception
+    @Test
+    @ArgumentsSource(AdapterProvider.class)
+    public void testExcept(Adapter adapter) throws Exception
     {
-        if (defaultAdapter instanceof MysqlAdapter)
+        if (adapter instanceof MysqlAdapter)
         {
             log.error("testExcept(): "
                     + "MySQL does not support "
@@ -172,11 +186,13 @@ public class SelectSetOperationTest exte
      *
      * @throws Exception if the test fails
      */
-    public void testExceptAll() throws Exception
-    {
-        if (defaultAdapter instanceof OracleAdapter
-                || defaultAdapter instanceof MysqlAdapter
-                || defaultAdapter instanceof MssqlAdapter)
+    @Test
+    @ArgumentsSource(AdapterProvider.class)
+    public void testExceptAll(Adapter adapter) throws Exception
+    {
+        if (adapter instanceof OracleAdapter
+                || adapter instanceof MysqlAdapter
+                || adapter instanceof MssqlAdapter)
         {
             log.error("testExceptAll(): "
                     + "Oracle, MySQL and MSSQL do not support "
@@ -225,11 +241,13 @@ public class SelectSetOperationTest exte
      *
      * @throws Exception if the test fails
      */
-    public void testExceptAllMultipleOccurances() throws Exception
-    {
-        if (defaultAdapter instanceof OracleAdapter
-                || defaultAdapter instanceof MysqlAdapter
-                || defaultAdapter instanceof MssqlAdapter)
+    @Test
+    @ArgumentsSource(AdapterProvider.class)
+    public void testExceptAllMultipleOccurances(Adapter adapter) throws Exception
+    {
+        if (adapter instanceof OracleAdapter
+                || adapter instanceof MysqlAdapter
+                || adapter instanceof MssqlAdapter)
         {
             log.error("testExceptAllMultipleOccurances(): "
                     + "Oracle, MySQL and MSSQL do not support "
@@ -278,9 +296,11 @@ public class SelectSetOperationTest exte
      *
      * @throws Exception if the test fails
      */
-    public void testIntersect() throws Exception
+    @Test
+    @ArgumentsSource(AdapterProvider.class)
+    public void testIntersect(Adapter adapter) throws Exception
     {
-        if (defaultAdapter instanceof MysqlAdapter)
+        if (adapter instanceof MysqlAdapter)
         {
             log.error("testIntersect(): "
                     + "MySQL does not support "
@@ -325,11 +345,13 @@ public class SelectSetOperationTest exte
      *
      * @throws Exception if the test fails
      */
-    public void testIntersectAllMultipleOccurances() throws Exception
-    {
-        if (defaultAdapter instanceof OracleAdapter
-                || defaultAdapter instanceof MysqlAdapter
-                || defaultAdapter instanceof MssqlAdapter)
+    @Test
+    @ArgumentsSource(AdapterProvider.class)
+    public void testIntersectAllMultipleOccurances(Adapter adapter) throws Exception
+    {
+        if (adapter instanceof OracleAdapter
+                || adapter instanceof MysqlAdapter
+                || adapter instanceof MssqlAdapter)
         {
             log.error("testIntersectAllMultipleOccurances(): "
                     + "Oracle, MySQL and MSSQL do not support "
@@ -381,11 +403,13 @@ public class SelectSetOperationTest exte
      *
      * @throws Exception if the test fails
      */
-    public void testIntersectAll() throws Exception
-    {
-        if (defaultAdapter instanceof OracleAdapter
-                || defaultAdapter instanceof MysqlAdapter
-                || defaultAdapter instanceof MssqlAdapter)
+    @Test
+    @ArgumentsSource(AdapterProvider.class)
+    public void testIntersectAll(Adapter adapter) throws Exception
+    {
+        if (adapter instanceof OracleAdapter
+                || adapter instanceof MysqlAdapter
+                || adapter instanceof MssqlAdapter)
         {
             log.error("testIntersectAll(): "
                     + "Oracle, MySQL and MSSQL do not support "
@@ -436,6 +460,7 @@ public class SelectSetOperationTest exte
      *
      * @throws Exception if the test fails
      */
+    @Test
     public void testUnionAllOrderByLimitOffset() throws Exception
     {
         Criteria criteria = new Criteria()

Modified: db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/generated/peer/SelectTest.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/generated/peer/SelectTest.java?rev=1870836&r1=1870835&r2=1870836&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/generated/peer/SelectTest.java (original)
+++ db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/generated/peer/SelectTest.java Wed Dec  4 15:51:06 2019
@@ -35,6 +35,14 @@ import org.apache.torque.test.peer.Autho
 import org.apache.torque.test.peer.BookPeer;
 import org.apache.torque.test.recordmapper.AuthorRecordMapper;
 import org.apache.torque.test.recordmapper.BookRecordMapper;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+import static org.junit.Assert.assertNull;
 
 /**
  * Tests simple selects.
@@ -45,10 +53,9 @@ public class SelectTest extends BaseData
 {
     private List<Author> authorList;
 
-    @Override
+    @BeforeEach
     public void setUp() throws Exception
     {
-        super.setUp();
         cleanBookstore();
         authorList = insertBookstoreData();
     }
@@ -58,6 +65,7 @@ public class SelectTest extends BaseData
      *
      * @throws Exception if the test fails
      */
+    @Test
     public void testSelectInteger() throws Exception
     {
         Criteria criteria = new Criteria().where(
@@ -107,6 +115,7 @@ public class SelectTest extends BaseData
      *
      * @throws Exception if the test fails
      */
+    @Test
     public void testSelectSingleRecord() throws Exception
     {
         Criteria criteria = new Criteria().where(
@@ -127,6 +136,7 @@ public class SelectTest extends BaseData
      *
      * @throws Exception if the test fails
      */
+    @Test
     public void testSelectSingleRecordWithConnection() throws Exception
     {
         Criteria criteria = new Criteria().where(
@@ -150,6 +160,7 @@ public class SelectTest extends BaseData
      *
      * @throws Exception if the test fails
      */
+    @Test
     public void testSelectSingleRecordWithObject() throws Exception
     {
         Author author = AuthorPeer.doSelectSingleRecord(authorList.get(0));
@@ -166,6 +177,7 @@ public class SelectTest extends BaseData
      *
      * @throws Exception if the test fails
      */
+    @Test
     public void testSelectSingleRecordResultNull() throws Exception
     {
         Criteria criteria = new Criteria().where(
@@ -182,6 +194,7 @@ public class SelectTest extends BaseData
      *
      * @throws Exception if the test fails
      */
+    @Test
     public void testSelectSingleRecordTooManyRecords() throws Exception
     {
         Criteria criteria = new Criteria();
@@ -202,6 +215,7 @@ public class SelectTest extends BaseData
      *
      * @throws Exception if the test fails.
      */
+    @Test
     public void testSelectOperatorIsNull() throws Exception
     {
         Criteria criteria = new Criteria();
@@ -231,6 +245,7 @@ public class SelectTest extends BaseData
      *
      * @throws Exception if the test fails.
      */
+    @Test
     public void testSelectOperatorIsNotNull() throws Exception
     {
         Criteria criteria = new Criteria();
@@ -246,6 +261,7 @@ public class SelectTest extends BaseData
      *
      * @throws Exception if the test fails.
      */
+    @Test
     public void testSelectOperatorIsNotNullOtherComparison() throws Exception
     {
         Criteria criteria = new Criteria();
@@ -261,6 +277,7 @@ public class SelectTest extends BaseData
      *
      * @throws Exception if the test fails.
      */
+    @Test
     public void testPartialSelectOnlyOwnColumns() throws Exception
     {
         Book bookToSelect = authorList.get(0).getBooks().get(0);
@@ -284,6 +301,7 @@ public class SelectTest extends BaseData
      *
      * @throws Exception if the test fails.
      */
+    @Test
     public void testPartialSelectOffset() throws Exception
     {
         Criteria criteria = new Criteria();
@@ -337,6 +355,7 @@ public class SelectTest extends BaseData
      *
      * @throws Exception if the test fails.
      */
+    @Test
     public void testPartialSelectForeignColumns() throws Exception
     {
         Criteria criteria = new Criteria();
@@ -364,6 +383,7 @@ public class SelectTest extends BaseData
      *
      * @throws Exception if the test fails.
      */
+    @Test
     public void testPartialSelectNoOwnColumns() throws Exception
     {
         Book bookToSelect = authorList.get(0).getBooks().get(0);
@@ -382,6 +402,7 @@ public class SelectTest extends BaseData
      *
      * @throws Exception if the test fails.
      */
+    @Test
     public void testSelectSimpleKey() throws Exception
     {
         Book bookToSelect = authorList.get(0).getBooks().get(0);
@@ -398,6 +419,7 @@ public class SelectTest extends BaseData
      *
      * @throws Exception if the test fails.
      */
+    @Test
     public void testSelectSimpleKeyNullValue() throws Exception
     {
         SimpleKey<?> keyToSelect = SimpleKey.keyFor((Integer) null);

Modified: db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/generated/peer/SetAndSaveTest.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/generated/peer/SetAndSaveTest.java?rev=1870836&r1=1870835&r2=1870836&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/generated/peer/SetAndSaveTest.java (original)
+++ db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/generated/peer/SetAndSaveTest.java Wed Dec  4 15:51:06 2019
@@ -34,6 +34,13 @@ import org.apache.torque.test.dbobject.N
 import org.apache.torque.test.dbobject.OIntegerPk;
 import org.apache.torque.test.peer.CompIntegerVarcharPkPeer;
 import org.apache.torque.test.peer.OIntegerPkPeer;
+import org.junit.jupiter.api.Test;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+import static org.junit.Assert.assertNull;
 
 /**
  * Tests the setAndSave method for different constellations.
@@ -50,6 +57,7 @@ public class SetAndSaveTest extends Base
      *
      * @throws Exception if the test fails
      */
+    @Test
     public void testSetAndSavePkIntegerForeignKey() throws Exception
     {
         ForeignKeySchemaData.clearTablesInDatabase();
@@ -128,6 +136,7 @@ public class SetAndSaveTest extends Base
      *
      * @throws Exception if the test fails
      */
+    @Test
     public void testSetAndSaveNonpkIntegerForeignKey() throws Exception
     {
         ForeignKeySchemaData.clearTablesInDatabase();
@@ -171,6 +180,7 @@ public class SetAndSaveTest extends Base
      *
      * @throws Exception if the test fails
      */
+    @Test
     public void testSetAndSaveCachedCollection() throws Exception
     {
         ForeignKeySchemaData.clearTablesInDatabase();
@@ -268,6 +278,7 @@ public class SetAndSaveTest extends Base
      *
      * @throws Exception if the test fails
      */
+    @Test
     public void testSetAndSaveCompositePkIntegerForeignKey() throws Exception
     {
         ForeignKeySchemaData.clearTablesInDatabase();
@@ -360,6 +371,7 @@ public class SetAndSaveTest extends Base
      *
      * @throws Exception if the test fails
      */
+    @Test
     public void testSetAndSaveCompositePkOtherFk() throws Exception
     {
         ForeignKeySchemaData.clearTablesInDatabase();
@@ -439,6 +451,7 @@ public class SetAndSaveTest extends Base
      *
      * @throws Exception if the test fails
      */
+    @Test
     public void testSetAndSaveCompositePkContainsFk() throws Exception
     {
         ForeignKeySchemaData.clearTablesInDatabase();
@@ -496,6 +509,7 @@ public class SetAndSaveTest extends Base
      *
      * @throws Exception if the test fails
      */
+    @Test
     public void testSetAndSaveModifiedReferencingObject() throws Exception
     {
         ForeignKeySchemaData.clearTablesInDatabase();
@@ -548,6 +562,7 @@ public class SetAndSaveTest extends Base
      *
      * @throws Exception if the test fails
      */
+    @Test
     public void testSetAndSaveModifiedReferencedObject() throws Exception
     {
         ForeignKeySchemaData.clearTablesInDatabase();
@@ -576,6 +591,7 @@ public class SetAndSaveTest extends Base
      *
      * @throws Exception if the test fails
      */
+    @Test
     public void testSetAndSaveEmptyListSingleFk() throws Exception
     {
         ForeignKeySchemaData.clearTablesInDatabase();
@@ -612,6 +628,7 @@ public class SetAndSaveTest extends Base
      *
      * @throws Exception if the test fails
      */
+    @Test
     public void testSetAndSaveEmptyListCompositeFk() throws Exception
     {
         ForeignKeySchemaData.clearTablesInDatabase();

Modified: db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/generated/peer/WhereClauseSubselectTest.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/generated/peer/WhereClauseSubselectTest.java?rev=1870836&r1=1870835&r2=1870836&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/generated/peer/WhereClauseSubselectTest.java (original)
+++ db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/generated/peer/WhereClauseSubselectTest.java Wed Dec  4 15:51:06 2019
@@ -27,13 +27,24 @@ import org.apache.commons.logging.LogFac
 import org.apache.torque.BaseDatabaseTestCase;
 import org.apache.torque.ColumnImpl;
 import org.apache.torque.TorqueException;
+import org.apache.torque.adapter.Adapter;
 import org.apache.torque.adapter.MysqlAdapter;
 import org.apache.torque.criteria.Criteria;
+import org.apache.torque.junit5.extension.AdapterProvider;
 import org.apache.torque.test.dbobject.Author;
 import org.apache.torque.test.dbobject.Book;
 import org.apache.torque.test.peer.AuthorPeer;
 import org.apache.torque.test.peer.BookPeer;
 import org.apache.torque.util.functions.Count;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.params.provider.ArgumentsSource;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+import static org.junit.Assert.assertNull;
 
 /**
  * Tests subselects in the where clause.
@@ -51,10 +62,9 @@ public class WhereClauseSubselectTest ex
     Book book1;
     Book book3;
 
-    @Override
+    @BeforeEach
     public void setUp() throws Exception
     {
-        super.setUp();
         cleanBookstore();
         author1 = new Author();
         author1.setName("author1");
@@ -84,9 +94,11 @@ public class WhereClauseSubselectTest ex
      *
      * @throws Exception if the test fails
      */
-    public void testSubselectUsingInWithInteger() throws Exception
+    @Test
+    @ArgumentsSource(AdapterProvider.class)
+    public void testSubselectUsingInWithInteger(Adapter adapter) throws Exception
     {
-        if (!supportsSubselects())
+        if (!supportsSubselects(adapter))
         {
             return;
         }
@@ -134,9 +146,11 @@ public class WhereClauseSubselectTest ex
      *
      * @throws Exception if the test fails
      */
-    public void testSubselectAsLvalue() throws Exception
+    @Test
+    @ArgumentsSource(AdapterProvider.class)
+    public void testSubselectAsLvalue(Adapter adapter) throws Exception
     {
-        if (!supportsSubselects())
+        if (!supportsSubselects(adapter))
         {
             return;
         }
@@ -166,9 +180,11 @@ public class WhereClauseSubselectTest ex
      *
      * @throws Exception if the test fails
      */
-    public void testSubselectUsingEquals() throws Exception
+    @Test
+    @ArgumentsSource(AdapterProvider.class)
+    public void testSubselectUsingEquals(Adapter adapter) throws Exception
     {
-        if (!supportsSubselects())
+        if (!supportsSubselects(adapter))
         {
             return;
         }
@@ -197,9 +213,11 @@ public class WhereClauseSubselectTest ex
      *
      * @throws Exception if the test fails
      */
-    public void testSubselectUsingInWithStrings() throws Exception
+    @Test
+    @ArgumentsSource(AdapterProvider.class)
+    public void testSubselectUsingInWithStrings(Adapter adapter) throws Exception
     {
-        if (!supportsSubselects())
+        if (!supportsSubselects(adapter))
         {
             return;
         }
@@ -247,9 +265,11 @@ public class WhereClauseSubselectTest ex
      *
      * @throws Exception if the test fails
      */
-    public void testSubselectReferencingOuterSelectWithManuallyAddedFromClause() throws Exception
+    @Test
+    @ArgumentsSource(AdapterProvider.class)
+    public void testSubselectReferencingOuterSelectWithManuallyAddedFromClause(Adapter adapter) throws Exception
     {
-        if (!supportsSubselects())
+        if (!supportsSubselects(adapter))
         {
             return;
         }
@@ -281,9 +301,11 @@ public class WhereClauseSubselectTest ex
      *
      * @throws Exception if the test fails
      */
-    public void testSubselectReferencingOuterSelect() throws Exception
+    @Test
+    @ArgumentsSource(AdapterProvider.class)
+    public void testSubselectReferencingOuterSelect(Adapter adapter) throws Exception
     {
-        if (!supportsSubselects())
+        if (!supportsSubselects(adapter))
         {
             return;
         }
@@ -317,9 +339,10 @@ public class WhereClauseSubselectTest ex
      *
      * @throws TorqueException If an error occurs.
      */
-    private boolean supportsSubselects() throws TorqueException
+    
+    private boolean supportsSubselects(Adapter adapter) throws TorqueException
     {
-        if (!(defaultAdapter instanceof MysqlAdapter))
+        if (!(adapter instanceof MysqlAdapter))
         {
             return true;
         }

Added: db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/junit5/extension/AdapterParameterResolver.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/junit5/extension/AdapterParameterResolver.java?rev=1870836&view=auto
==============================================================================
--- db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/junit5/extension/AdapterParameterResolver.java (added)
+++ db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/junit5/extension/AdapterParameterResolver.java Wed Dec  4 15:51:06 2019
@@ -0,0 +1,28 @@
+package org.apache.torque.junit5.extension;
+
+import org.apache.torque.adapter.Adapter;
+import org.junit.jupiter.api.extension.ExtensionContext;
+import org.junit.jupiter.api.extension.ParameterContext;
+import org.junit.jupiter.api.extension.ParameterResolutionException;
+import org.junit.jupiter.api.extension.ParameterResolver;
+import org.junit.jupiter.api.extension.ExtensionContext.Namespace;
+
+public class AdapterParameterResolver implements ParameterResolver {
+
+    @Override
+    public boolean supportsParameter(ParameterContext parameterContext, ExtensionContext extensionContext)
+            throws ParameterResolutionException {
+        return parameterContext.getParameter().getType().equals(Adapter.class);
+    }
+
+    @Override
+    public Object resolveParameter(ParameterContext parameterContext, ExtensionContext extensionContext)
+            throws ParameterResolutionException {
+        try {
+            return extensionContext.getStore(Namespace.GLOBAL).get("adapter") ;//AdapterFactory.create("");
+        } catch (Exception e) {
+            throw new ParameterResolutionException(e.getMessage());
+        }
+    }
+
+}

Propchange: db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/junit5/extension/AdapterParameterResolver.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/junit5/extension/AdapterProvider.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/junit5/extension/AdapterProvider.java?rev=1870836&view=auto
==============================================================================
--- db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/junit5/extension/AdapterProvider.java (added)
+++ db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/junit5/extension/AdapterProvider.java Wed Dec  4 15:51:06 2019
@@ -0,0 +1,18 @@
+package org.apache.torque.junit5.extension;
+
+import java.util.stream.Stream;
+
+import org.apache.torque.adapter.Adapter;
+import org.junit.jupiter.api.extension.ExtensionContext;
+import org.junit.jupiter.api.extension.ExtensionContext.Namespace;
+import org.junit.jupiter.params.provider.Arguments;
+import org.junit.jupiter.params.provider.ArgumentsProvider;
+
+public class AdapterProvider implements ArgumentsProvider {
+
+    @Override
+    public Stream<? extends Arguments> provideArguments(ExtensionContext context) throws Exception {
+        return Stream.of( (Adapter) context.getStore( Namespace.GLOBAL).get("adapter")).map(Arguments::of);
+    }
+
+}

Propchange: db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/junit5/extension/AdapterProvider.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/junit5/extension/HostCallback.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/junit5/extension/HostCallback.java?rev=1870836&view=auto
==============================================================================
--- db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/junit5/extension/HostCallback.java (added)
+++ db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/junit5/extension/HostCallback.java Wed Dec  4 15:51:06 2019
@@ -0,0 +1,25 @@
+package org.apache.torque.junit5.extension;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import org.junit.jupiter.api.Tag;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.condition.EnabledIfEnvironmentVariable;
+import org.junit.jupiter.api.extension.ExtendWith;
+
+// may have ParameterizedTest in test class -> Possible configuration error
+@Test
+@Tag("host")
+@Inherited
+@Target( { ElementType.TYPE, ElementType.METHOD } )
+@Retention(RetentionPolicy.RUNTIME)
+@ExtendWith(HostCallbackExtension.class)
+@ExtendWith(AdapterParameterResolver.class)
+//@EnabledIfEnvironmentVariable(named = "torque.callback", matches = "host")
+public @interface HostCallback {
+
+}

Propchange: db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/junit5/extension/HostCallback.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/junit5/extension/HostCallbackExtension.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/junit5/extension/HostCallbackExtension.java?rev=1870836&view=auto
==============================================================================
--- db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/junit5/extension/HostCallbackExtension.java (added)
+++ db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/junit5/extension/HostCallbackExtension.java Wed Dec  4 15:51:06 2019
@@ -0,0 +1,79 @@
+package org.apache.torque.junit5.extension;
+
+
+import static org.junit.jupiter.api.extension.ConditionEvaluationResult.enabled;
+
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+import org.apache.torque.Torque;
+import org.apache.torque.adapter.Adapter;
+import org.apache.torque.testcontainer.junit5.extension.DockerCallbackExtension;
+import org.junit.jupiter.api.extension.BeforeAllCallback;
+import org.junit.jupiter.api.extension.ConditionEvaluationResult;
+import org.junit.jupiter.api.extension.ExecutionCondition;
+import org.junit.jupiter.api.extension.ExtensionContext;
+import org.junit.jupiter.api.extension.ExtensionContext.Namespace;
+
+/**
+ * Legacy host based testing requires a database environment settings available and started.
+ * 
+ * @author gk
+ *
+ */
+public class HostCallbackExtension implements BeforeAllCallback, ExecutionCondition {
+    
+  private static final Logger log = LogManager.getLogger(HostCallbackExtension.class);
+
+  /** The system property containing the path to the configuration file. */
+  public static final String CONFIG_FILE_SYSTEM_PROPERTY
+  = "torque.configuration.file";
+
+  protected static Adapter defaultAdapter;
+  
+  public static Namespace NS = Namespace.create(DockerCallbackExtension.class);
+  
+  public boolean skip = true;
+  
+  private static final ConditionEvaluationResult ENABLED_BY_DEFAULT = enabled(
+          "HostCallbackExtension does not enable test - checking internal state only");
+  
+  @Override
+  public ConditionEvaluationResult evaluateExecutionCondition(ExtensionContext context) {
+      String actual = System.getProperty("torque.callback");
+      if (actual != null && actual.matches("host")) {
+          skip = false;
+      }
+      return ENABLED_BY_DEFAULT;
+  }
+  
+  @Override
+  public void beforeAll(ExtensionContext context) throws Exception {
+      if (skip) {
+          log.info("skipping host based environment call context, torque.callback: {} ", System.getenv("torque.callback"));    
+      } else {
+          //log.info("starting call context "+ context); 
+          setUp();
+          context.getStore(Namespace.GLOBAL).put("adapter", defaultAdapter);          
+      }
+  }
+
+  /**
+   * Initialize Torque on the first setUp().  Subclasses which override
+   * setUp() must call super.setUp() as their first action.
+   */
+  public void setUp() throws Exception
+  {
+      synchronized (HostCallbackExtension.class)
+      {
+          if (!Torque.isInit())
+          {
+              Torque.init(
+                      System.getProperty(
+                              CONFIG_FILE_SYSTEM_PROPERTY));
+          }
+      }
+      defaultAdapter = Torque.getDatabase(Torque.getDefaultDB()).getAdapter();
+  }
+
+    
+}

Propchange: db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/junit5/extension/HostCallbackExtension.java
------------------------------------------------------------------------------
    svn:eol-style = native



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


Mime
View raw message