From db11684e3a6037ebf25418696a87b9b451f92398 Mon Sep 17 00:00:00 2001
From: AAZIBOU EL GERRAB Nabila <n1aazibo@enib.fr>
Date: Mon, 7 Aug 2023 09:31:23 +0200
Subject: [PATCH] add SpecficConfTest for system testing

---
 .../gazelle/goctests/SpecificConfTest.java    | 77 ++++++++++++++++++-
 1 file changed, 76 insertions(+), 1 deletion(-)

diff --git a/hl7templates/goc-tests/goc-tests-runner/src/test/java/net/ihe/gazelle/goctests/SpecificConfTest.java b/hl7templates/goc-tests/goc-tests-runner/src/test/java/net/ihe/gazelle/goctests/SpecificConfTest.java
index 2161d8d..7ffdbf8 100644
--- a/hl7templates/goc-tests/goc-tests-runner/src/test/java/net/ihe/gazelle/goctests/SpecificConfTest.java
+++ b/hl7templates/goc-tests/goc-tests-runner/src/test/java/net/ihe/gazelle/goctests/SpecificConfTest.java
@@ -10,10 +10,12 @@ import net.ihe.gazelle.goctests.interlay.exceptions.ResultTransformationExceptio
 import net.ihe.gazelle.goctests.interlay.exceptions.SpecificationException;
 import org.junit.Test;
 
+import static org.junit.Assert.assertTrue;
+
 public class SpecificConfTest {
 
     @Test
-    public void test() throws ReportGenerationException, TestRunnerException,
+    public void cardinalityTest() throws ReportGenerationException, TestRunnerException,
             SpecificationException, EnvironementException, ResultTransformationException {
 
         System.setProperty("hl7Conf", "cdaxehealth");
@@ -23,4 +25,77 @@ public class SpecificConfTest {
 
         System.out.println(testResult);
     }
+
+    @Test
+    public void mandatoryTest() throws ReportGenerationException, TestRunnerException,
+            SpecificationException, EnvironementException, ResultTransformationException {
+
+        System.setProperty("hl7Conf", "cdaxehealth");
+
+        SystemTestExecutor executor = new SystemTestExecutor(SpecificationType.MANDATORY);
+        TestResult testResult = executor.execute();
+
+        System.out.println(testResult);
+    }
+
+    @Test
+    public void datatypeTest() throws ReportGenerationException, TestRunnerException,
+            SpecificationException, EnvironementException, ResultTransformationException {
+
+        System.setProperty("hl7Conf", "cdaxehealth");
+
+        SystemTestExecutor executor = new SystemTestExecutor(SpecificationType.DATATYPE);
+        TestResult testResult = executor.execute();
+
+        System.out.println(testResult);
+    }
+
+    @Test
+    public void contestTest() throws ReportGenerationException, TestRunnerException,
+            SpecificationException, EnvironementException, ResultTransformationException {
+
+        System.setProperty("hl7Conf", "cdaxehealth");
+
+        SystemTestExecutor executor = new SystemTestExecutor(SpecificationType.CONTEXT);
+        TestResult testResult = executor.execute();
+
+        System.out.println(testResult);
+    }
+
+    @Test
+    public void fixedValueTest() throws ReportGenerationException, TestRunnerException,
+            SpecificationException, EnvironementException, ResultTransformationException {
+
+        System.setProperty("hl7Conf", "cdaxehealth");
+
+        SystemTestExecutor executor = new SystemTestExecutor(SpecificationType.FIXEDVAL);
+        TestResult testResult = executor.execute();
+
+        System.out.println(testResult);
+    }
+
+    @Test
+    public void testChoice() throws ReportGenerationException, TestRunnerException,
+            SpecificationException, EnvironementException, ResultTransformationException {
+
+        System.setProperty("hl7Conf", "cdaxehealth");
+
+        SystemTestExecutor executor = new SystemTestExecutor(SpecificationType.CHOICE);
+        TestResult testResult = executor.execute();
+
+        System.out.println(testResult);
+    }
+
+    @Test
+    public void testGlobal() throws ReportGenerationException, TestRunnerException,
+            SpecificationException, EnvironementException, ResultTransformationException {
+
+        System.setProperty("hl7Conf", "cdaxehealth");
+
+        SystemTestExecutor executor = new SystemTestExecutor(SpecificationType.GLOBAL);
+        TestResult testResult = executor.execute();
+
+        System.out.println(testResult);
+    }
+
 }
-- 
GitLab