diff options
author | Sébastien Determe <sd378r@intl.att.com> | 2017-09-08 10:44:21 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2017-09-08 10:44:21 +0000 |
commit | f0c6215103464e860b756d9e781b7e4d34b30541 (patch) | |
tree | fc0caded616831b2d1ab41db39fedcb7364df0f0 /src/test/java/org/onap | |
parent | 72e904aa818b14e0f3d869c94cac3cb90930749e (diff) | |
parent | 4c14395a640b3f0f1d0422b5ff7f840ebee8e92d (diff) |
Merge "Add Holmes to the Backend"
Diffstat (limited to 'src/test/java/org/onap')
-rw-r--r-- | src/test/java/org/onap/clamp/clds/transform/XslTransformerTest.java | 34 |
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); + } +} |