summaryrefslogtreecommitdiffstats
path: root/src/test/java/org
diff options
context:
space:
mode:
authorDeterme, Sebastien (sd378r) <sd378r@intl.att.com>2017-09-08 12:14:08 +0200
committerDeterme, Sebastien (sd378r) <sd378r@intl.att.com>2017-09-08 12:14:08 +0200
commit4c14395a640b3f0f1d0422b5ff7f840ebee8e92d (patch)
treec8c9db66e7bdcafbe4f2d9147c60475cea1a0daa /src/test/java/org
parent25f65d0f6bd061facf88dab5859ddef1926dfecc (diff)
Add Holmes to the Backend
Add support for Holmes boxes defined in GUI, Holmes model has been added and also policy calls. Change-Id: I2bbef0030b5174075792b459b7ced74aa2e8aad2 Issue-Id: CLAMP-27 Signed-off-by: Determe, Sebastien (sd378r) <sd378r@intl.att.com>
Diffstat (limited to 'src/test/java/org')
-rw-r--r--src/test/java/org/onap/clamp/clds/transform/XslTransformerTest.java34
1 files changed, 34 insertions, 0 deletions
diff --git a/src/test/java/org/onap/clamp/clds/transform/XslTransformerTest.java b/src/test/java/org/onap/clamp/clds/transform/XslTransformerTest.java
new file mode 100644
index 000000000..8ee60e745
--- /dev/null
+++ b/src/test/java/org/onap/clamp/clds/transform/XslTransformerTest.java
@@ -0,0 +1,34 @@
+package org.onap.clamp.clds.transform;
+
+import static org.junit.Assert.assertNotNull;
+
+import java.io.IOException;
+
+import javax.xml.transform.TransformerException;
+
+import org.junit.Test;
+import org.onap.clamp.clds.util.ResourceFileUtil;
+import org.skyscreamer.jsonassert.JSONAssert;
+
+public class XslTransformerTest {
+
+ /**
+ * This test validates the XSLT to convert BPMN xml to BPMN JSON.
+ *
+ * @throws TransformerException
+ * In case of issues
+ * @throws IOException
+ * In case of issues
+ */
+ @Test
+ public void xslTransformTest() throws TransformerException, IOException {
+ XslTransformer xslTransformer = new XslTransformer();
+ xslTransformer.setXslResourceName("xsl/clds-bpmn-transformer.xsl");
+
+ String bpmnJson = xslTransformer
+ .doXslTransformToString(ResourceFileUtil.getResourceAsString("example/xsl-validation/modelBpmn.xml"));
+ assertNotNull(bpmnJson);
+ JSONAssert.assertEquals(ResourceFileUtil.getResourceAsString("example/xsl-validation/modelBpmnForVerif.json"),
+ bpmnJson, true);
+ }
+}