db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From g.@apache.org
Subject svn commit: r1855607 - in /db/torque/torque4/trunk: ./ torque-ant-tasks/ torque-ant-tasks/src/test/java/org/apache/torque/ant/task/ torque-generator/ torque-generator/src/test/java/org/apache/torque/generator/control/ torque-generator/src/test/java/org...
Date Fri, 15 Mar 2019 16:41:25 GMT
Author: gk
Date: Fri Mar 15 16:41:24 2019
New Revision: 1855607

URL: http://svn.apache.org/viewvc?rev=1855607&view=rev
Log:
- JUnit 5 cleanup and fix (remove testng from groovy conflicts, remove explicit junit 4) of poms
- Update commons-io to 2.6, mockito 2.23.0, surefire 3.0.0.-M3, profile java 8 fix update
- Updating some test packages in Torque template and generate, - Updated Test in ant and maven-plugin
- Use of commons.FileUtils and xmlunit 2 file compare tools instead of junitx.framework

Modified:
    db/torque/torque4/trunk/pom.xml
    db/torque/torque4/trunk/torque-ant-tasks/pom.xml
    db/torque/torque4/trunk/torque-ant-tasks/src/test/java/org/apache/torque/ant/task/TorqueGeneratorTaskTest.java
    db/torque/torque4/trunk/torque-generator/pom.xml
    db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/control/ChecksumsTest.java
    db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/control/DeeplyNestedMergepointsTest.java
    db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/control/ExistingTargetStrategyTest.java
    db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/control/OutputEncodingTest.java
    db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/control/PostprocessorTest.java
    db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/control/PropertyToJavaGenerationTest.java
    db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/control/PropertyToJavaJarGenerationTest.java
    db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/control/RunOnlyOnSourceChangeTest.java
    db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/control/TokenReplacerTest.java
    db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/example/gettingstarted/GettingStartedTest.java
    db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/source/transform/AttributeTransformerTest.java
    db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/source/transform/BeanPropertyMethodNameTransformerTest.java
    db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/source/transform/LoadAdditionalSourceTransformerTest.java
    db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/source/transform/LoadAllSourceFilesTransformerTest.java
    db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/source/transform/SourceElementToModelTransformerTest.java
    db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/template/groovy/GroovyTest.java
    db/torque/torque4/trunk/torque-maven-plugin/pom.xml
    db/torque/torque4/trunk/torque-maven-plugin/src/test/java/org/apache/torque/generator/maven/TorqueGeneratorMojoTest.java
    db/torque/torque4/trunk/torque-runtime/pom.xml
    db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/TorqueInstance.java
    db/torque/torque4/trunk/torque-templates/pom.xml
    db/torque/torque4/trunk/torque-templates/src/test/java/org/apache/torque/templates/GenerateOmClassesFromJavaTest.java
    db/torque/torque4/trunk/torque-templates/src/test/java/org/apache/torque/templates/TestProcessing.java
    db/torque/torque4/trunk/torque-templates/src/test/java/org/apache/torque/templates/jdbc2schema/Jdbc2SchemaTest.java
    db/torque/torque4/trunk/torque-test/pom.xml

Modified: db/torque/torque4/trunk/pom.xml
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/pom.xml?rev=1855607&r1=1855606&r2=1855607&view=diff
==============================================================================
--- db/torque/torque4/trunk/pom.xml (original)
+++ db/torque/torque4/trunk/pom.xml Fri Mar 15 16:41:24 2019
@@ -23,9 +23,9 @@
   <modelVersion>4.0.0</modelVersion>
 
   <parent>
-    <groupId>org.apache</groupId>
-    <artifactId>apache</artifactId>
-    <version>21</version>
+     <groupId>org.apache</groupId>
+     <artifactId>apache</artifactId>
+     <version>21</version>
   </parent>
   
   <groupId>org.apache.torque</groupId>
@@ -363,33 +363,13 @@
       <dependency>
         <groupId>commons-io</groupId>
         <artifactId>commons-io</artifactId>
-        <version>1.4</version>
-      </dependency>
-
-    <!-- we still need this dependency to  compile -->
-     <dependency>
-            <groupId>junit</groupId>
-            <artifactId>junit</artifactId>
-            <version>4.12</version>
-        </dependency>
-  
-      <dependency>
-        <groupId>junit-addons</groupId>
-        <artifactId>junit-addons</artifactId>
-        <version>1.4</version>
-        <scope>test</scope>
-        <exclusions>
-          <exclusion>
-            <groupId>xerces</groupId>
-            <artifactId>xmlParserAPIs</artifactId>
-          </exclusion>
-        </exclusions>
+        <version>2.6</version>
       </dependency>
 
       <dependency>
 	      <groupId>org.mockito</groupId>
 	      <artifactId>mockito-core</artifactId>
-	      <version>2.22.0</version>
+	      <version>2.23.0</version>
           <scope>test</scope>
       </dependency>      
  	  
@@ -498,7 +478,7 @@
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-surefire-plugin</artifactId>
-        <version>3.0.0-M2</version>
+        <version>3.0.0-M3</version>
         <configuration>
           <!--default setting is forkCount=1/reuseForks=true -->
           <reuseForks>false</reuseForks>
@@ -632,12 +612,12 @@
       </modules>
     </profile>
     <profile>
-        <id>java8</id>
+       <id>java8</id>
         <activation>
             <jdk>[1.8,)</jdk>  
         </activation>
         <properties>
-          <additionalparam>-Xdoclint:none</additionalparam>
+          <doclint>none</doclint><!-- since javadoc v.3 this is required instead of -Xdoclint:none -->
         </properties>
     </profile>
     <profile>

Modified: db/torque/torque4/trunk/torque-ant-tasks/pom.xml
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-ant-tasks/pom.xml?rev=1855607&r1=1855606&r2=1855607&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-ant-tasks/pom.xml (original)
+++ db/torque/torque4/trunk/torque-ant-tasks/pom.xml Fri Mar 15 16:41:24 2019
@@ -51,16 +51,6 @@
     </dependency>
 
     <dependency>
-      <groupId>junit</groupId>
-      <artifactId>junit</artifactId>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>junit-addons</groupId>
-      <artifactId>junit-addons</artifactId>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
       <groupId>commons-io</groupId>
       <artifactId>commons-io</artifactId>
       <scope>test</scope>

Modified: db/torque/torque4/trunk/torque-ant-tasks/src/test/java/org/apache/torque/ant/task/TorqueGeneratorTaskTest.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-ant-tasks/src/test/java/org/apache/torque/ant/task/TorqueGeneratorTaskTest.java?rev=1855607&r1=1855606&r2=1855607&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-ant-tasks/src/test/java/org/apache/torque/ant/task/TorqueGeneratorTaskTest.java (original)
+++ db/torque/torque4/trunk/torque-ant-tasks/src/test/java/org/apache/torque/ant/task/TorqueGeneratorTaskTest.java Fri Mar 15 16:41:24 2019
@@ -1,5 +1,7 @@
 package org.apache.torque.ant.task;
 
+import static org.junit.jupiter.api.Assertions.assertTrue;
+
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -21,12 +23,13 @@ package org.apache.torque.ant.task;
 
 import java.io.File;
 
-import junit.framework.TestCase;
-
 import org.apache.commons.io.FileUtils;
+import org.junit.jupiter.api.Test;
 
-public class TorqueGeneratorTaskTest extends TestCase
+public class TorqueGeneratorTaskTest 
 {
+    
+    @Test
     public void testExecute() throws Exception
     {
         File target = new File("target/tests/torqueGeneratorTaskTest");
@@ -44,8 +47,8 @@ public class TorqueGeneratorTaskTest ext
         assertTrue(generatedJavaFile.exists());
         File expectedJavaFile = new File(
                 "src/test/resources/org/apache/torque/ant/PropertyKeys.java");
-        junitx.framework.FileAssert.assertEquals(
-                expectedJavaFile,
-                generatedJavaFile);
+        
+        assertTrue(FileUtils.contentEquals(generatedJavaFile, expectedJavaFile), "The files differ!");
+
     }
 }

Modified: db/torque/torque4/trunk/torque-generator/pom.xml
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/pom.xml?rev=1855607&r1=1855606&r2=1855607&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-generator/pom.xml (original)
+++ db/torque/torque4/trunk/torque-generator/pom.xml Fri Mar 15 16:41:24 2019
@@ -83,8 +83,14 @@
     <dependency>
         <groupId>org.codehaus.groovy</groupId>
         <artifactId>groovy-all</artifactId>
-        <version>2.5.5</version>
+        <version>2.5.6</version>
         <type>pom</type>
+        <exclusions>
+          <exclusion>
+            <groupId>org.codehaus.groovy</groupId>
+            <artifactId>groovy-testng</artifactId>
+          </exclusion>
+        </exclusions>
     </dependency>
     <dependency>
       <!-- 
@@ -104,24 +110,15 @@
         </exclusion>
       </exclusions-->
     </dependency>
+    
+     <dependency>
+        <groupId>org.xmlunit</groupId>
+        <artifactId>xmlunit-core</artifactId>
+        <version>2.6.2</version>
+        <scope>test</scope>
+     </dependency>
 
     <dependency>
-      <groupId>junit</groupId>
-      <artifactId>junit</artifactId>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>junit-addons</groupId>
-      <artifactId>junit-addons</artifactId>
-      <scope>test</scope>
-      <exclusions>
-        <exclusion>
-          <groupId>xerces</groupId>
-          <artifactId>xmlParserAPIs</artifactId>
-        </exclusion>
-      </exclusions>
-    </dependency>
-    <dependency>
       <groupId>org.mockito</groupId>
       <artifactId>mockito-core</artifactId>
       <scope>test</scope>

Modified: db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/control/ChecksumsTest.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/control/ChecksumsTest.java?rev=1855607&r1=1855606&r2=1855607&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/control/ChecksumsTest.java (original)
+++ db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/control/ChecksumsTest.java Fri Mar 15 16:41:24 2019
@@ -18,11 +18,10 @@ package org.apache.torque.generator.cont
  * specific language governing permissions and limitations
  * under the License.
  */
-
-import static org.junit.Assert.assertArrayEquals;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
+import static org.junit.jupiter.api.Assertions.assertArrayEquals;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertTrue;
 
 import java.io.File;
 import java.text.SimpleDateFormat;
@@ -30,8 +29,9 @@ import java.util.Date;
 
 import org.apache.commons.io.FileUtils;
 import org.apache.torque.generator.BaseTest;
-import org.junit.Before;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+
 
 /**
  * Tests the class LastChangesContent.
@@ -46,7 +46,7 @@ public class ChecksumsTest extends BaseT
     private static final File CHECKSUM_FILE
         = new File(CHECKSUM_DIR, "checksum");
 
-    @Before
+    @BeforeEach
     public void cleanUp()
     {
         if (CHECKSUM_FILE.exists())
@@ -102,14 +102,14 @@ public class ChecksumsTest extends BaseT
                 + expectedLine3.length(),
                 fileContent.length());
         assertTrue(
-                "Content " + fileContent + " should contain " + expectedLine1,
-                fileContent.contains(expectedLine1));
+                fileContent.contains(expectedLine1),
+                "Content " + fileContent + " should contain " + expectedLine1);
         assertTrue(
-                "Content " + fileContent + " should contain " + expectedLine2,
-                fileContent.contains(expectedLine2));
+                fileContent.contains(expectedLine2),
+                "Content " + fileContent + " should contain " + expectedLine2);
         assertTrue(
-                "Content " + fileContent + " should contain " + expectedLine3,
-                fileContent.contains(expectedLine3));
+                fileContent.contains(expectedLine3),
+                "Content " + fileContent + " should contain " + expectedLine3);
     }
 
     @Test

Modified: db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/control/DeeplyNestedMergepointsTest.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/control/DeeplyNestedMergepointsTest.java?rev=1855607&r1=1855606&r2=1855607&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/control/DeeplyNestedMergepointsTest.java (original)
+++ db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/control/DeeplyNestedMergepointsTest.java Fri Mar 15 16:41:24 2019
@@ -18,9 +18,8 @@ package org.apache.torque.generator.cont
  * specific language governing permissions and limitations
  * under the License.
  */
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertTrue;
 
 import java.io.File;
 import java.io.FileReader;
@@ -33,7 +32,8 @@ import org.apache.torque.generator.confi
 import org.apache.torque.generator.configuration.paths.CustomProjectPaths;
 import org.apache.torque.generator.configuration.paths.DefaultTorqueGeneratorPaths;
 import org.apache.torque.generator.configuration.paths.Maven2DirectoryProjectPaths;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
+
 
 /**
  * Tests nested mergepoints in a depth of 10 calls, and checks that the

Modified: db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/control/ExistingTargetStrategyTest.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/control/ExistingTargetStrategyTest.java?rev=1855607&r1=1855606&r2=1855607&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/control/ExistingTargetStrategyTest.java (original)
+++ db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/control/ExistingTargetStrategyTest.java Fri Mar 15 16:41:24 2019
@@ -18,9 +18,8 @@ package org.apache.torque.generator.cont
  * specific language governing permissions and limitations
  * under the License.
  */
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertTrue;
 
 import java.io.File;
 import java.io.IOException;
@@ -35,8 +34,9 @@ import org.apache.torque.generator.confi
 import org.apache.torque.generator.configuration.paths.CustomProjectPaths;
 import org.apache.torque.generator.configuration.paths.DefaultTorqueGeneratorPaths;
 import org.apache.torque.generator.configuration.paths.Maven2DirectoryProjectPaths;
-import org.junit.Before;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+
 
 public class ExistingTargetStrategyTest extends BaseTest
 {
@@ -53,7 +53,7 @@ public class ExistingTargetStrategyTest
     private final String srcPath1 = "src/main/torque-gen/src/source1.properties";
     private final String srcPath2 = "src/main/torque-gen/src/source2.properties";
 
-    @Before
+    @BeforeEach
     public void setUp() throws IOException
     {
         FileUtils.deleteDirectory(targetDir1);

Modified: db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/control/OutputEncodingTest.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/control/OutputEncodingTest.java?rev=1855607&r1=1855606&r2=1855607&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/control/OutputEncodingTest.java (original)
+++ db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/control/OutputEncodingTest.java Fri Mar 15 16:41:24 2019
@@ -18,9 +18,8 @@ package org.apache.torque.generator.cont
  * specific language governing permissions and limitations
  * under the License.
  */
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertTrue;
 
 import java.io.File;
 import java.io.IOException;
@@ -33,7 +32,9 @@ import org.apache.torque.generator.confi
 import org.apache.torque.generator.configuration.paths.CustomProjectPaths;
 import org.apache.torque.generator.configuration.paths.DefaultTorqueGeneratorPaths;
 import org.apache.torque.generator.configuration.paths.Maven2DirectoryProjectPaths;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
+
+;
 
 /**
  * Tests whether the output encoding handling is correct.

Modified: db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/control/PostprocessorTest.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/control/PostprocessorTest.java?rev=1855607&r1=1855606&r2=1855607&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/control/PostprocessorTest.java (original)
+++ db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/control/PostprocessorTest.java Fri Mar 15 16:41:24 2019
@@ -18,9 +18,8 @@ package org.apache.torque.generator.cont
  * specific language governing permissions and limitations
  * under the License.
  */
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertTrue;
 
 import java.io.File;
 import java.util.ArrayList;
@@ -32,7 +31,8 @@ import org.apache.torque.generator.confi
 import org.apache.torque.generator.configuration.paths.CustomProjectPaths;
 import org.apache.torque.generator.configuration.paths.DefaultTorqueGeneratorPaths;
 import org.apache.torque.generator.configuration.paths.Maven2DirectoryProjectPaths;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
+
 
 /**
  * Tests whether postprocessing works as expected.

Modified: db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/control/PropertyToJavaGenerationTest.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/control/PropertyToJavaGenerationTest.java?rev=1855607&r1=1855606&r2=1855607&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/control/PropertyToJavaGenerationTest.java (original)
+++ db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/control/PropertyToJavaGenerationTest.java Fri Mar 15 16:41:24 2019
@@ -1,5 +1,7 @@
 package org.apache.torque.generator.control;
 
+
+
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -18,11 +20,10 @@ package org.apache.torque.generator.cont
  * specific language governing permissions and limitations
  * under the License.
  */
-
-import static org.junit.Assert.assertArrayEquals;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
+import static org.junit.jupiter.api.Assertions.assertArrayEquals;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertTrue;
 
 import java.io.File;
 import java.util.ArrayList;
@@ -35,7 +36,7 @@ import org.apache.torque.generator.confi
 import org.apache.torque.generator.configuration.paths.CustomProjectPaths;
 import org.apache.torque.generator.configuration.paths.DefaultTorqueGeneratorPaths;
 import org.apache.torque.generator.configuration.paths.Maven2DirectoryProjectPaths;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
 /**
  * A test case for a more complex generation.

Modified: db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/control/PropertyToJavaJarGenerationTest.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/control/PropertyToJavaJarGenerationTest.java?rev=1855607&r1=1855606&r2=1855607&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/control/PropertyToJavaJarGenerationTest.java (original)
+++ db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/control/PropertyToJavaJarGenerationTest.java Fri Mar 15 16:41:24 2019
@@ -18,8 +18,7 @@ package org.apache.torque.generator.cont
  * specific language governing permissions and limitations
  * under the License.
  */
-
-import static org.junit.Assert.assertTrue;
+import static org.junit.jupiter.api.Assertions.assertTrue;
 
 import java.io.File;
 import java.util.ArrayList;
@@ -30,7 +29,8 @@ import org.apache.torque.generator.BaseT
 import org.apache.torque.generator.configuration.UnitDescriptor;
 import org.apache.torque.generator.configuration.paths.DefaultTorqueGeneratorPaths;
 import org.apache.torque.generator.configuration.paths.Maven2JarProjectPaths;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
+
 
 /**
  * Tests generation where the templates are read from a jar file.

Modified: db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/control/RunOnlyOnSourceChangeTest.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/control/RunOnlyOnSourceChangeTest.java?rev=1855607&r1=1855606&r2=1855607&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/control/RunOnlyOnSourceChangeTest.java (original)
+++ db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/control/RunOnlyOnSourceChangeTest.java Fri Mar 15 16:41:24 2019
@@ -18,9 +18,8 @@ package org.apache.torque.generator.cont
  * specific language governing permissions and limitations
  * under the License.
  */
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertTrue;
 
 import java.io.File;
 import java.io.IOException;
@@ -38,7 +37,7 @@ import org.apache.torque.generator.confi
 import org.apache.torque.generator.configuration.paths.CustomProjectPaths;
 import org.apache.torque.generator.configuration.paths.DefaultTorqueGeneratorPaths;
 import org.apache.torque.generator.configuration.paths.Maven2DirectoryProjectPaths;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
 /**
  * Tests nested mergepoints in a depth of 10 calls, and checks that the

Modified: db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/control/TokenReplacerTest.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/control/TokenReplacerTest.java?rev=1855607&r1=1855606&r2=1855607&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/control/TokenReplacerTest.java (original)
+++ db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/control/TokenReplacerTest.java Fri Mar 15 16:41:24 2019
@@ -18,24 +18,23 @@ package org.apache.torque.generator.cont
  * specific language governing permissions and limitations
  * under the License.
  */
-
-import static org.junit.Assert.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertEquals;
 
 import org.apache.torque.generator.BaseTest;
 import org.apache.torque.generator.configuration.UnitConfiguration;
-import org.apache.torque.generator.control.ControllerState;
-import org.apache.torque.generator.control.TokenReplacer;
 import org.apache.torque.generator.option.Option;
 import org.apache.torque.generator.option.OptionImpl;
 import org.apache.torque.generator.option.Options;
-import org.junit.Before;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+
+
 
 public class TokenReplacerTest extends BaseTest
 {
     private TokenReplacer tokenReplacer;
 
-    @Before
+    @BeforeEach
     public void setUp()
     {
         Options options = new Options();

Modified: db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/example/gettingstarted/GettingStartedTest.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/example/gettingstarted/GettingStartedTest.java?rev=1855607&r1=1855606&r2=1855607&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/example/gettingstarted/GettingStartedTest.java (original)
+++ db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/example/gettingstarted/GettingStartedTest.java Fri Mar 15 16:41:24 2019
@@ -18,8 +18,7 @@ package org.apache.torque.generator.exam
  * specific language governing permissions and limitations
  * under the License.
  */
-
-import static org.junit.Assert.assertTrue;
+import static org.junit.jupiter.api.Assertions.assertTrue;
 
 import java.io.File;
 import java.util.ArrayList;
@@ -32,7 +31,7 @@ import org.apache.torque.generator.confi
 import org.apache.torque.generator.configuration.paths.DefaultTorqueGeneratorPaths;
 import org.apache.torque.generator.configuration.paths.Maven2DirectoryProjectPaths;
 import org.apache.torque.generator.control.Controller;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
 public class GettingStartedTest extends BaseTest
 {
@@ -59,8 +58,10 @@ public class GettingStartedTest extends
         assertTrue(generatedJavaFile.exists());
         File expectedJavaFile = new File(
                 "src/test/resources/org/apache/torque/generator/example/gettingstarted/PropertyKeys.java");
-        junitx.framework.FileAssert.assertEquals(
-                expectedJavaFile,
-                generatedJavaFile);
+        
+        assertTrue(FileUtils.contentEquals(generatedJavaFile, expectedJavaFile), "The files differ!");
+        //junitx.framework.FileAssert.assertEquals(
+        //         expectedJavaFile,
+       //          generatedJavaFile);
     }
 }

Modified: db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/source/transform/AttributeTransformerTest.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/source/transform/AttributeTransformerTest.java?rev=1855607&r1=1855606&r2=1855607&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/source/transform/AttributeTransformerTest.java (original)
+++ db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/source/transform/AttributeTransformerTest.java Fri Mar 15 16:41:24 2019
@@ -18,22 +18,22 @@ package org.apache.torque.generator.sour
  * specific language governing permissions and limitations
  * under the License.
  */
-
-import static org.junit.Assert.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertThrows;
 
 import java.io.StringReader;
 import java.util.List;
 
-import org.apache.torque.generator.source.transform.AttributeTransformer;
-import org.apache.torque.generator.source.transform.SourceTransformerException;
-import org.junit.Before;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+
+
 
 public class AttributeTransformerTest
 {
     private AttributeTransformer emptyTransformer;
 
-    @Before
+    @BeforeEach
     public void before() throws SourceTransformerException
     {
         StringReader stringReader = new StringReader("#");
@@ -176,79 +176,93 @@ public class AttributeTransformerTest
         assertEquals("someAttribute1", result.get(4).getContent());
     }
 
-    @Test(expected = SourceTransformerException.class)
-    public void testParseNotEndedDefinition() throws SourceTransformerException
+    @Test
+    public void testParseNotEndedDefinition()
     {
-        emptyTransformer.parse(
+        assertThrows(SourceTransformerException.class, ()  -> {
+            emptyTransformer.parse(
                 "${option:torque.endlessAttribute",
                 false);
+        });
     }
 
-    @Test(expected = SourceTransformerException.class)
+    @Test
     public void testParseDefinitionInsideType()
-            throws SourceTransformerException
     {
-        emptyTransformer.parse(
-                "${option:torque${option:torque.otherAttr}",
-                false);
+        assertThrows(SourceTransformerException.class, ()  -> {
+            emptyTransformer.parse(
+                    "${option:torque${option:torque.otherAttr}",
+                    false);
+        });
     }
 
-    @Test(expected = SourceTransformerException.class)
+    @Test
     public void testParseDefinitionInsideValue()
-            throws SourceTransformerException
-    {
-        emptyTransformer.parse(
-                "${option:torque.attribute${option:torque.otherAttr}",
-                false);
+    {      
+        assertThrows(SourceTransformerException.class, ()  -> {
+            emptyTransformer.parse(
+                    "${option:torque.attribute${option:torque.otherAttr}",
+                    false);
+        });
     }
 
-    @Test(expected = SourceTransformerException.class)
-    public void testUnknownDefinition() throws SourceTransformerException
+    @Test
+    public void testUnknownDefinition()
     {
-        emptyTransformer.parse(
-                "${unknownDefinition:torque.unknownDefinition}",
-                false);
+        assertThrows(SourceTransformerException.class, ()  -> {
+            emptyTransformer.parse(
+                    "${unknownDefinition:torque.unknownDefinition}",
+                    false);
+        });
     }
 
-    @Test(expected = SourceTransformerException.class)
-    public void testParsePlainInTarget() throws SourceTransformerException
+    @Test
+    public void testParsePlainInTarget()
     {
-        emptyTransformer.parse(
-                "xy",
-                false);
+        assertThrows(SourceTransformerException.class, ()  -> {
+            emptyTransformer.parse(
+                    "xy",
+                    false);
+        });
     }
 
-    @Test(expected = SourceTransformerException.class)
-    public void testParseOptionInTarget() throws SourceTransformerException
+    @Test
+    public void testParseOptionInTarget()
     {
-        emptyTransformer.parse(
-                "${option:torque.optionValue}",
-                false);
+        assertThrows(SourceTransformerException.class, ()  -> {         
+            emptyTransformer.parse(
+                    "${option:torque.optionValue}",
+                    false);
+        });
     }
 
-    @Test(expected = SourceTransformerException.class)
-    public void testParseAttributeInTarget() throws SourceTransformerException
+    @Test
+    public void testParseAttributeInTarget()
     {
-        emptyTransformer.parse(
-                "${attribute:torque.attributeValue}",
-                false);
+        assertThrows(SourceTransformerException.class, ()  -> {
+            emptyTransformer.parse(
+                    "${attribute:torque.attributeValue}",
+                    false);
+        });
     }
 
-    @Test(expected = SourceTransformerException.class)
+    @Test
     public void testParseNoOverrideAttributeInSource()
-            throws SourceTransformerException
     {
-        emptyTransformer.parse(
-                "${attribute(noOverride):torque.attributeValue}",
-                true);
+        assertThrows(SourceTransformerException.class, ()  -> {
+            emptyTransformer.parse(
+                    "${attribute(noOverride):torque.attributeValue}",
+                    true);
+            });
     }
 
-    @Test(expected = SourceTransformerException.class)
+    @Test
     public void testParseOverrideAttributeInSource()
-            throws SourceTransformerException
     {
-        emptyTransformer.parse(
-                "${attribute(override):torque.attributeValue}",
-                true);
+        assertThrows(SourceTransformerException.class, ()  -> {
+            emptyTransformer.parse(
+                    "${attribute(override):torque.attributeValue}",
+                    true);
+        });
     }
 }

Modified: db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/source/transform/BeanPropertyMethodNameTransformerTest.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/source/transform/BeanPropertyMethodNameTransformerTest.java?rev=1855607&r1=1855606&r2=1855607&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/source/transform/BeanPropertyMethodNameTransformerTest.java (original)
+++ db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/source/transform/BeanPropertyMethodNameTransformerTest.java Fri Mar 15 16:41:24 2019
@@ -18,14 +18,12 @@ package org.apache.torque.generator.sour
  * specific language governing permissions and limitations
  * under the License.
  */
-
-import static org.junit.Assert.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertEquals;
 
 import org.apache.torque.generator.source.SourceElement;
-import org.apache.torque.generator.source.transform.BeanPropertyMethodNameTransformer;
-import org.apache.torque.generator.source.transform.SourceTransformerException;
-import org.junit.Before;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+
 
 /**
  * Converts a source element Attribute such that it can be used as method name.
@@ -40,7 +38,7 @@ public class BeanPropertyMethodNameTrans
 {
     private BeanPropertyMethodNameTransformer transformer;
 
-    @Before
+    @BeforeEach
     public void before() throws SourceTransformerException
     {
         transformer = new BeanPropertyMethodNameTransformer();

Modified: db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/source/transform/LoadAdditionalSourceTransformerTest.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/source/transform/LoadAdditionalSourceTransformerTest.java?rev=1855607&r1=1855606&r2=1855607&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/source/transform/LoadAdditionalSourceTransformerTest.java (original)
+++ db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/source/transform/LoadAdditionalSourceTransformerTest.java Fri Mar 15 16:41:24 2019
@@ -19,8 +19,7 @@ package org.apache.torque.generator.sour
  * under the License.
  */
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
+import static org.junit.jupiter.api.Assertions.*;
 
 import java.io.File;
 import java.util.ArrayList;
@@ -33,7 +32,8 @@ import org.apache.torque.generator.confi
 import org.apache.torque.generator.configuration.paths.DefaultTorqueGeneratorPaths;
 import org.apache.torque.generator.configuration.paths.Maven2DirectoryProjectPaths;
 import org.apache.torque.generator.control.Controller;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
+
 
 /**
  * Tests whether the loadAdditionalSourceTransformer works correctly.

Modified: db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/source/transform/LoadAllSourceFilesTransformerTest.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/source/transform/LoadAllSourceFilesTransformerTest.java?rev=1855607&r1=1855606&r2=1855607&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/source/transform/LoadAllSourceFilesTransformerTest.java (original)
+++ db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/source/transform/LoadAllSourceFilesTransformerTest.java Fri Mar 15 16:41:24 2019
@@ -19,10 +19,11 @@ package org.apache.torque.generator.sour
  * under the License.
  */
 
-import static junitx.framework.FileAssert.assertEquals;
-import static org.junit.Assert.assertTrue;
+import static org.junit.jupiter.api.Assertions.*;
 
 import java.io.File;
+import java.nio.charset.Charset;
+import java.nio.charset.StandardCharsets;
 import java.util.ArrayList;
 import java.util.List;
 
@@ -33,7 +34,11 @@ import org.apache.torque.generator.confi
 import org.apache.torque.generator.configuration.paths.DefaultTorqueGeneratorPaths;
 import org.apache.torque.generator.configuration.paths.Maven2DirectoryProjectPaths;
 import org.apache.torque.generator.control.Controller;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
+import org.xmlunit.builder.DiffBuilder;
+import org.xmlunit.diff.DefaultNodeMatcher;
+import org.xmlunit.diff.Diff;
+import org.xmlunit.diff.ElementSelectors;
 
 /**
  * Tests whether the loadAllSourceTransformer works correctly.
@@ -64,10 +69,25 @@ public class LoadAllSourceFilesTransform
         File targetFile = new File(targetDir, "output_for_source1.xml");
         assertTrue(targetFile.exists());
         File expectedFile = new File(TEST_RESOURCES_ROOT, "expected1.xml");
-        assertEquals(expectedFile, targetFile);
+
+        String result = FileUtils.readFileToString(targetFile, StandardCharsets.UTF_8);
+        String reference = FileUtils.readFileToString(expectedFile, StandardCharsets.UTF_8);
+        Diff myDiffIdentical = DiffBuilder.compare(reference).ignoreComments().withTest(result)
+                                   .withNodeMatcher(new DefaultNodeMatcher(ElementSelectors.byName))
+                                   .checkForIdentical()
+                                   .build();
+        assertFalse(myDiffIdentical.hasDifferences(), "XML identical " + myDiffIdentical.toString());
+
         targetFile = new File(targetDir, "output_for_source2.xml");
         assertTrue(targetFile.exists());
         expectedFile = new File(TEST_RESOURCES_ROOT, "expected2.xml");
-        assertEquals(expectedFile, targetFile);
+        
+        result = FileUtils.readFileToString(targetFile, StandardCharsets.UTF_8);
+        reference = FileUtils.readFileToString(expectedFile, StandardCharsets.UTF_8);
+        myDiffIdentical = DiffBuilder.compare(reference).ignoreComments().withTest(result)
+                                   .withNodeMatcher(new DefaultNodeMatcher(ElementSelectors.byName))
+                                   .checkForIdentical()
+                                   .build();
+        assertFalse(myDiffIdentical.hasDifferences(), "XML identical " + myDiffIdentical.toString());
     }
 }

Modified: db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/source/transform/SourceElementToModelTransformerTest.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/source/transform/SourceElementToModelTransformerTest.java?rev=1855607&r1=1855606&r2=1855607&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/source/transform/SourceElementToModelTransformerTest.java (original)
+++ db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/source/transform/SourceElementToModelTransformerTest.java Fri Mar 15 16:41:24 2019
@@ -18,9 +18,8 @@ package org.apache.torque.generator.sour
  * specific language governing permissions and limitations
  * under the License.
  */
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertSame;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertSame;
 
 import java.util.List;
 
@@ -28,8 +27,9 @@ import org.apache.torque.generator.BaseT
 import org.apache.torque.generator.configuration.UnitConfiguration;
 import org.apache.torque.generator.control.ControllerState;
 import org.apache.torque.generator.source.SourceElement;
-import org.junit.Before;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+
 
 /**
  * Tests whether the loadAllSourceTransformer works correctly.
@@ -51,7 +51,7 @@ public class SourceElementToModelTransfo
      */
     private ControllerState controllerState;
 
-    @Before
+    @BeforeEach
     public void setUp()
     {
         rootSourceElement = new SourceElement("root");

Modified: db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/template/groovy/GroovyTest.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/template/groovy/GroovyTest.java?rev=1855607&r1=1855606&r2=1855607&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/template/groovy/GroovyTest.java (original)
+++ db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/template/groovy/GroovyTest.java Fri Mar 15 16:41:24 2019
@@ -18,9 +18,8 @@ package org.apache.torque.generator.temp
  * specific language governing permissions and limitations
  * under the License.
  */
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertTrue;
 
 import java.io.File;
 import java.util.ArrayList;
@@ -32,8 +31,8 @@ import org.apache.torque.generator.confi
 import org.apache.torque.generator.configuration.paths.DefaultTorqueGeneratorPaths;
 import org.apache.torque.generator.configuration.paths.Maven2DirectoryProjectPaths;
 import org.apache.torque.generator.control.Controller;
-import org.junit.Before;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
 
 /**
  * Tests that another template language can easily integrated.
@@ -51,7 +50,7 @@ public class GroovyTest
     private static final File TEMPLATE_OUTPUT_FILE
         = new File(TARGET_DIR, "templateOutput.txt");
 
-    @Before
+    @BeforeEach
     public void setUp() throws Exception
     {
         FileUtils.deleteDirectory(TARGET_DIR);

Modified: db/torque/torque4/trunk/torque-maven-plugin/pom.xml
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-maven-plugin/pom.xml?rev=1855607&r1=1855606&r2=1855607&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-maven-plugin/pom.xml (original)
+++ db/torque/torque4/trunk/torque-maven-plugin/pom.xml Fri Mar 15 16:41:24 2019
@@ -68,16 +68,6 @@
     </dependency>
 
     <dependency>
-      <groupId>junit</groupId>
-      <artifactId>junit</artifactId>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>junit-addons</groupId>
-      <artifactId>junit-addons</artifactId>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
       <groupId>commons-io</groupId>
       <artifactId>commons-io</artifactId>
       <scope>test</scope>

Modified: db/torque/torque4/trunk/torque-maven-plugin/src/test/java/org/apache/torque/generator/maven/TorqueGeneratorMojoTest.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-maven-plugin/src/test/java/org/apache/torque/generator/maven/TorqueGeneratorMojoTest.java?rev=1855607&r1=1855606&r2=1855607&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-maven-plugin/src/test/java/org/apache/torque/generator/maven/TorqueGeneratorMojoTest.java (original)
+++ db/torque/torque4/trunk/torque-maven-plugin/src/test/java/org/apache/torque/generator/maven/TorqueGeneratorMojoTest.java Fri Mar 15 16:41:24 2019
@@ -1,6 +1,6 @@
 package org.apache.torque.generator.maven;
 
-import static org.junit.Assert.assertTrue;
+import static org.junit.jupiter.api.Assertions.assertTrue;
 
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
@@ -23,11 +23,9 @@ import static org.junit.Assert.assertTru
 
 import java.io.File;
 
-import org.junit.Test;
-
 import org.apache.commons.io.FileUtils;
 import org.apache.maven.project.MavenProject;
-import org.apache.torque.generator.maven.TorqueGeneratorMojo;
+import org.junit.jupiter.api.Test;
 
 public class TorqueGeneratorMojoTest
 {
@@ -51,8 +49,7 @@ public class TorqueGeneratorMojoTest
         assertTrue(generatedJavaFile.exists());
         File expectedJavaFile = new File(
                 "src/test/resources/org/apache/torque/generator/maven/PropertyKeys.java");
-        junitx.framework.FileAssert.assertEquals(
-                expectedJavaFile,
-                generatedJavaFile);
+
+        assertTrue(FileUtils.contentEquals(generatedJavaFile, expectedJavaFile), "The files differ!");
     }
 }

Modified: db/torque/torque4/trunk/torque-runtime/pom.xml
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-runtime/pom.xml?rev=1855607&r1=1855606&r2=1855607&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-runtime/pom.xml (original)
+++ db/torque/torque4/trunk/torque-runtime/pom.xml Fri Mar 15 16:41:24 2019
@@ -81,11 +81,6 @@
       <optional>true</optional>
     </dependency>
 
-    <dependency>
-      <groupId>junit</groupId>
-      <artifactId>junit</artifactId>
-      <scope>test</scope>
-    </dependency>
     
     <dependency>
       <groupId>org.apache.fulcrum</groupId>

Modified: db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/TorqueInstance.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/TorqueInstance.java?rev=1855607&r1=1855606&r2=1855607&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/TorqueInstance.java (original)
+++ db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/TorqueInstance.java Fri Mar 15 16:41:24 2019
@@ -350,6 +350,7 @@ public class TorqueInstance
                             log.error(
                                     "Could not get product information from JDBC",
                                     e);
+                             throw new InstantiationException(e.getMessage());
                         }
                     }
                     else

Modified: db/torque/torque4/trunk/torque-templates/pom.xml
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/pom.xml?rev=1855607&r1=1855606&r2=1855607&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-templates/pom.xml (original)
+++ db/torque/torque4/trunk/torque-templates/pom.xml Fri Mar 15 16:41:24 2019
@@ -53,23 +53,19 @@
     </dependency>
     
     <!-- Test dependencies -->
-    <dependency>
-      <groupId>junit</groupId>
-      <artifactId>junit</artifactId>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>xmlunit</groupId>
-      <artifactId>xmlunit</artifactId>
-      <version>1.6</version>
-      <scope>test</scope>
-    </dependency>
+     <dependency>
+        <groupId>org.xmlunit</groupId>
+        <artifactId>xmlunit-core</artifactId>
+        <version>2.6.2</version>
+        <scope>test</scope>
+     </dependency>
     <dependency>
       <groupId>org.apache.derby</groupId>
       <artifactId>derby</artifactId>
       <version>10.14.2.0</version>
       <scope>test</scope>
     </dependency>
+    
   </dependencies>
 
   <build>

Modified: db/torque/torque4/trunk/torque-templates/src/test/java/org/apache/torque/templates/GenerateOmClassesFromJavaTest.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/test/java/org/apache/torque/templates/GenerateOmClassesFromJavaTest.java?rev=1855607&r1=1855606&r2=1855607&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-templates/src/test/java/org/apache/torque/templates/GenerateOmClassesFromJavaTest.java (original)
+++ db/torque/torque4/trunk/torque-templates/src/test/java/org/apache/torque/templates/GenerateOmClassesFromJavaTest.java Fri Mar 15 16:41:24 2019
@@ -19,7 +19,7 @@ package org.apache.torque.templates;
  * under the License.
  */
 
-import static org.junit.Assert.assertTrue;
+import static org.junit.jupiter.api.Assertions.assertTrue;
 
 import java.io.File;
 import java.util.ArrayList;
@@ -34,7 +34,8 @@ import org.apache.torque.generator.confi
 import org.apache.torque.generator.configuration.paths.Maven2DirectoryProjectPaths;
 import org.apache.torque.generator.configuration.paths.Maven2ProjectPaths;
 import org.apache.torque.generator.control.Controller;
-import org.junit.Test;
+import org.junit.jupiter.api.DisplayName;
+import org.junit.jupiter.api.Test;
 
 /**
  * Tests how to access the templates from java.
@@ -49,6 +50,7 @@ import org.junit.Test;
 public class GenerateOmClassesFromJavaTest
 {
     @Test
+    @DisplayName("Generate OM Classes From Java")
     public void generateOMClassesFromJava() throws Exception
     {
         Controller controller = new Controller();

Modified: db/torque/torque4/trunk/torque-templates/src/test/java/org/apache/torque/templates/TestProcessing.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/test/java/org/apache/torque/templates/TestProcessing.java?rev=1855607&r1=1855606&r2=1855607&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-templates/src/test/java/org/apache/torque/templates/TestProcessing.java (original)
+++ db/torque/torque4/trunk/torque-templates/src/test/java/org/apache/torque/templates/TestProcessing.java Fri Mar 15 16:41:24 2019
@@ -19,8 +19,8 @@ package org.apache.torque.templates;
  * under the License.
  */
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertFalse;
 
 import java.io.File;
 import java.io.IOException;
@@ -43,14 +43,15 @@ import org.apache.torque.generator.contr
 import org.apache.torque.generator.file.Fileset;
 import org.apache.torque.generator.source.SourceProvider;
 import org.apache.torque.generator.source.stream.FileSourceProvider;
-import org.junit.Before;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+
 
 public class TestProcessing
 {
     private static final String SCHEMA_DIR = "src/test/schema";
 
-    @Before
+    @BeforeEach
     public void setUp() throws Exception
     {
         final String testRoot = "target";

Modified: db/torque/torque4/trunk/torque-templates/src/test/java/org/apache/torque/templates/jdbc2schema/Jdbc2SchemaTest.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/test/java/org/apache/torque/templates/jdbc2schema/Jdbc2SchemaTest.java?rev=1855607&r1=1855606&r2=1855607&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-templates/src/test/java/org/apache/torque/templates/jdbc2schema/Jdbc2SchemaTest.java (original)
+++ db/torque/torque4/trunk/torque-templates/src/test/java/org/apache/torque/templates/jdbc2schema/Jdbc2SchemaTest.java Fri Mar 15 16:41:24 2019
@@ -1,5 +1,9 @@
 package org.apache.torque.templates.jdbc2schema;
 
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+import static org.junit.jupiter.api.Assertions.fail;
+
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -19,10 +23,10 @@ package org.apache.torque.templates.jdbc
  * under the License.
  */
 
-import static org.junit.Assert.assertTrue;
 
 import java.io.BufferedReader;
 import java.io.File;
+import java.io.IOException;
 import java.io.InputStream;
 import java.io.InputStreamReader;
 import java.sql.Connection;
@@ -39,18 +43,22 @@ import org.apache.commons.io.FileUtils;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.log4j.BasicConfigurator;
+import org.apache.torque.generator.GeneratorException;
 import org.apache.torque.generator.configuration.UnitDescriptor;
 import org.apache.torque.generator.configuration.option.MapOptionsConfiguration;
 import org.apache.torque.generator.configuration.paths.CustomProjectPaths;
 import org.apache.torque.generator.configuration.paths.DefaultTorqueGeneratorPaths;
 import org.apache.torque.generator.configuration.paths.Maven2DirectoryProjectPaths;
 import org.apache.torque.generator.control.Controller;
-import org.custommonkey.xmlunit.XMLAssert;
-import org.junit.Before;
-import org.junit.BeforeClass;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+import org.xmlunit.builder.DiffBuilder;
+import org.xmlunit.diff.DefaultNodeMatcher;
+import org.xmlunit.diff.Diff;
+import org.xmlunit.diff.ElementSelectors;
 
-public class Jdbc2SchemaTest
+public class Jdbc2SchemaTest /* implements TestExecutionExceptionHandler */
 {
     private static Log log
     = LogFactory.getLog(Jdbc2SchemaTest.class);
@@ -63,13 +71,13 @@ public class Jdbc2SchemaTest
 
     private static String DRIVER = "org.apache.derby.jdbc.EmbeddedDriver";
 
-    @BeforeClass
+    @BeforeAll
     public static void beforeClass() throws Exception
     {
         Class.forName(DRIVER).newInstance();
     }
 
-    @Before
+    @BeforeEach
     public void setUp() throws Exception
     {
         BasicConfigurator.configure();
@@ -113,7 +121,7 @@ public class Jdbc2SchemaTest
     }
 
     @Test
-    public void testExecute() throws Exception
+    public void testExecute()
     {
         Controller controller = new Controller();
         List<UnitDescriptor> unitDescriptors = new ArrayList<>();
@@ -137,14 +145,40 @@ public class Jdbc2SchemaTest
                 new MapOptionsConfiguration(overrideOptions));
         unitDescriptors.add(unitDescriptor);
 
-        controller.run(unitDescriptors);
+        try {
+            controller.run(unitDescriptors);
 
-        File generatedFile = new File("target/generated-schema/schema.xml");
-        assertTrue(generatedFile.exists());
-        String result = FileUtils.readFileToString(generatedFile);
-        File referenceFile = new File(
-                "src/test/resources/org/apache/torque/templates/jdbc2schema/expected-schema.xml");
-        String reference = FileUtils.readFileToString(referenceFile);
-        XMLAssert.assertXMLEqual(reference, result);
+            File generatedFile = new File("target/generated-schema/schema.xml");
+            assertTrue(generatedFile.exists());
+            String result = FileUtils.readFileToString(generatedFile);
+            File referenceFile = new File(
+                    "src/test/resources/org/apache/torque/templates/jdbc2schema/expected-schema.xml");
+            String reference = FileUtils.readFileToString(referenceFile);
+            
+            Diff myDiffSimilar = DiffBuilder.compare(reference).ignoreComments().withTest(result)
+                    .withNodeMatcher(new DefaultNodeMatcher(ElementSelectors.byName))
+                    .checkForSimilar()
+                    .build();
+            assertFalse(myDiffSimilar.hasDifferences(), "XML similar " + myDiffSimilar.toString());
+
+            
+            Diff myDiffIdentical = DiffBuilder.compare(reference).ignoreComments().withTest(result)
+                    .withNodeMatcher(new DefaultNodeMatcher(ElementSelectors.byName))
+                    .checkForIdentical()
+                    .build();
+            assertFalse(myDiffIdentical.hasDifferences(), "XML identical " + myDiffIdentical.toString());
+            
+            //XMLAssert.assertXMLEqual(reference, result);
+        } catch (GeneratorException e) {
+            fail();
+        } catch (IOException e) {
+            fail();
+        } 
+        
     }
+
+//    @Override
+//    public void handleTestExecutionException(ExtensionContext context, Throwable throwable) throws Throwable {
+//        throw throwable;
+//    }
 }

Modified: db/torque/torque4/trunk/torque-test/pom.xml
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-test/pom.xml?rev=1855607&r1=1855606&r2=1855607&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-test/pom.xml (original)
+++ db/torque/torque4/trunk/torque-test/pom.xml Fri Mar 15 16:41:24 2019
@@ -62,11 +62,7 @@
   </scm>
 
   <dependencies>
-    <dependency>
-      <artifactId>junit</artifactId>
-      <groupId>junit</groupId>
-      <scope>test</scope>
-    </dependency>
+  
     <dependency>
       <groupId>log4j</groupId>
       <artifactId>log4j</artifactId>



---------------------------------------------------------------------
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