From c1e886ebabb05d113e5815885c4d0d96981a0ccc Mon Sep 17 00:00:00 2001 From: "Determe, Sebastien (sd378r)" Date: Wed, 7 Feb 2018 10:02:14 +0100 Subject: Improve code of unit tests. Improve code according to Sonar result Issue-ID: CLAMP-74 Change-Id: I73b06ce29ac58df160441b20129bd1a3574af9ef Signed-off-by: Determe, Sebastien (sd378r) --- .../java/org/onap/clamp/clds/transform/XslTransformerTest.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/test/java/org/onap/clamp/clds/transform/XslTransformerTest.java b/src/test/java/org/onap/clamp/clds/transform/XslTransformerTest.java index ec34dd60..fd61ef4e 100644 --- a/src/test/java/org/onap/clamp/clds/transform/XslTransformerTest.java +++ b/src/test/java/org/onap/clamp/clds/transform/XslTransformerTest.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * ONAP CLAMP * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights + * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights * reserved. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); @@ -29,6 +29,7 @@ import java.io.IOException; import javax.xml.transform.TransformerException; +import org.json.JSONException; import org.junit.Test; import org.onap.clamp.clds.util.ResourceFileUtil; import org.skyscreamer.jsonassert.JSONAssert; @@ -42,12 +43,12 @@ public class XslTransformerTest { * In case of issues * @throws IOException * In case of issues + * @throws JSONException */ @Test - public void xslTransformTest() throws TransformerException, IOException { + public void xslTransformTest() throws TransformerException, IOException, JSONException { XslTransformer xslTransformer = new XslTransformer(); xslTransformer.setXslResourceName("xsl/clds-bpmn-transformer.xsl"); - String bpmnJson = xslTransformer .doXslTransformToString(ResourceFileUtil.getResourceAsString("example/xsl-validation/modelBpmn.xml")); assertNotNull(bpmnJson); -- cgit 1.2.3-korg