aboutsummaryrefslogtreecommitdiffstats
path: root/aai-schema
diff options
context:
space:
mode:
authorFiete Ostkamp <Fiete.Ostkamp@telekom.de>2024-11-13 09:58:26 +0100
committerFiete Ostkamp <Fiete.Ostkamp@telekom.de>2024-11-13 11:30:56 +0100
commitde80a9de71edd6005f15355a24dd6ce9781b99bf (patch)
treefaf06557102e6bb1f435301e1d6c2730842d631b /aai-schema
parentccf10e681044664888d7e0e0b50623bdbe92de5a (diff)
Migrate the schema-service from JUnit 4 to JUnit 5
Issue-ID: AAI-4053 Change-Id: I100c96c9d231f1d5c232886bc00bf3e05cc209b3 Signed-off-by: Fiete Ostkamp <Fiete.Ostkamp@telekom.de>
Diffstat (limited to 'aai-schema')
-rw-r--r--aai-schema/pom.xml26
-rw-r--r--aai-schema/src/test/java/org/onap/aai/schema/ValidateEdgeRulesTest.java4
-rw-r--r--aai-schema/src/test/java/org/onap/aai/schema/ValidateOXMTest.java10
3 files changed, 31 insertions, 9 deletions
diff --git a/aai-schema/pom.xml b/aai-schema/pom.xml
index a078d38..7588df7 100644
--- a/aai-schema/pom.xml
+++ b/aai-schema/pom.xml
@@ -51,9 +51,15 @@
<version>${project.version}</version>
</dependency>
<dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
+ <groupId>org.hamcrest</groupId>
+ <artifactId>hamcrest-junit</artifactId>
<scope>test</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
<dependency>
<groupId>org.jvnet.jaxb2_commons</groupId>
@@ -69,12 +75,28 @@
<dependency>
<groupId>com.googlecode.json-simple</groupId>
<artifactId>json-simple</artifactId>
+ <exclusions>
+ <exclusion>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>${commons.io.version}</version>
</dependency>
+ <dependency>
+ <groupId>org.junit.jupiter</groupId>
+ <artifactId>junit-jupiter-api</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.junit.jupiter</groupId>
+ <artifactId>junit-jupiter-engine</artifactId>
+ <scope>test</scope>
+ </dependency>
</dependencies>
<build>
<plugins>
diff --git a/aai-schema/src/test/java/org/onap/aai/schema/ValidateEdgeRulesTest.java b/aai-schema/src/test/java/org/onap/aai/schema/ValidateEdgeRulesTest.java
index 694f4b9..c09aae2 100644
--- a/aai-schema/src/test/java/org/onap/aai/schema/ValidateEdgeRulesTest.java
+++ b/aai-schema/src/test/java/org/onap/aai/schema/ValidateEdgeRulesTest.java
@@ -20,7 +20,7 @@
package org.onap.aai.schema;
-import static org.junit.Assert.fail;
+import static org.junit.jupiter.api.Assertions.fail;
import java.io.File;
import java.io.FileReader;
@@ -37,7 +37,7 @@ import org.json.simple.JSONArray;
import org.json.simple.JSONObject;
import org.json.simple.parser.JSONParser;
import org.json.simple.parser.ParseException;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
public class ValidateEdgeRulesTest {
diff --git a/aai-schema/src/test/java/org/onap/aai/schema/ValidateOXMTest.java b/aai-schema/src/test/java/org/onap/aai/schema/ValidateOXMTest.java
index c228e77..60619f1 100644
--- a/aai-schema/src/test/java/org/onap/aai/schema/ValidateOXMTest.java
+++ b/aai-schema/src/test/java/org/onap/aai/schema/ValidateOXMTest.java
@@ -20,8 +20,8 @@
package org.onap.aai.schema;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+import static org.junit.jupiter.api.Assertions.fail;
import java.io.*;
import java.nio.file.Path;
@@ -44,8 +44,8 @@ import org.json.simple.JSONArray;
import org.json.simple.JSONObject;
import org.json.simple.parser.JSONParser;
import org.json.simple.parser.ParseException;
-import org.junit.Ignore;
-import org.junit.Test;
+import org.junit.jupiter.api.Disabled;
+import org.junit.jupiter.api.Test;
import org.w3c.dom.*;
import org.xml.sax.SAXException;
@@ -472,7 +472,7 @@ public class ValidateOXMTest {
* dependentOn relationship matches what is listed in the edge rules.
*
*/
- @Ignore
+ @Disabled
@Test
public void testSchemaValidationAgainstEdgeRules() throws XPathExpressionException, IOException,
SAXException, ParserConfigurationException, ParseException {