aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSandeep J <sandeejh@in.ibm.com>2018-09-26 03:11:22 +0530
committerSandeep Jha <sandeejh@in.ibm.com>2018-09-26 07:14:27 +0000
commitc3e894237d04ca28c5506c5f0f6783d54add8ebf (patch)
tree23ff0bf72a233527a9eb1e4d56023a9947216832
parent0f82181e2621c414bbdaf6531696c5e25fe6ba9d (diff)
added test case to SliStringUtilsTest
to increase code coverage Issue-ID: CCSDK-595 Change-Id: I3cc31ab404fa5ee26bcecd1a5617b2423a10a96c Signed-off-by: Sandeep J <sandeejh@in.ibm.com>
-rw-r--r--sliPluginUtils/provider/src/test/java/org/onap/ccsdk/sli/core/slipluginutils/SliStringUtilsTest.java18
1 files changed, 13 insertions, 5 deletions
diff --git a/sliPluginUtils/provider/src/test/java/org/onap/ccsdk/sli/core/slipluginutils/SliStringUtilsTest.java b/sliPluginUtils/provider/src/test/java/org/onap/ccsdk/sli/core/slipluginutils/SliStringUtilsTest.java
index 4c665121..9bf851d5 100644
--- a/sliPluginUtils/provider/src/test/java/org/onap/ccsdk/sli/core/slipluginutils/SliStringUtilsTest.java
+++ b/sliPluginUtils/provider/src/test/java/org/onap/ccsdk/sli/core/slipluginutils/SliStringUtilsTest.java
@@ -3,7 +3,9 @@
* ONAP : CCSDK
* ================================================================================
* Copyright (C) 2017 AT&T Intellectual Property. All rights
- * reserved.
+ * reserved.
+ * ================================================================================
+ * Modifications Copyright (C) 2018 IBM.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -19,9 +21,6 @@
* ============LICENSE_END=========================================================
*/
-/**
- *
- */
package org.onap.ccsdk.sli.core.slipluginutils;
import static org.hamcrest.Matchers.equalTo;
@@ -30,7 +29,7 @@ import static org.junit.Assert.assertThat;
import java.util.HashMap;
import java.util.Map;
-
+
import org.junit.Before;
import org.junit.Test;
import org.onap.ccsdk.sli.core.sli.SvcLogicContext;
@@ -273,5 +272,14 @@ public class SliStringUtilsTest {
SliStringUtils.urlEncode(param, ctx);
assertEquals("102%2FGE100%2FSNJSCAMCJP8%2FSNJSCAMCJT4", ctx.getAttribute(outputPath));
}
+
+ @Test
+ public void testXmlEscapeText()
+ {
+ param.put("source", "102/GE100/SNJSCAMCJP8/SNJSCAMCJT4");
+ param.put("target", "target");
+ SliStringUtils.xmlEscapeText(param,ctx);
+ assertEquals("102/GE100/SNJSCAMCJP8/SNJSCAMCJT4",ctx.getAttribute("target"));
+ }
}