summaryrefslogtreecommitdiffstats
path: root/sliPluginUtils/provider/src/test
diff options
context:
space:
mode:
authorsurya-huawei <a.u.surya@huawei.com>2017-10-03 16:09:04 +0530
committersurya-huawei <a.u.surya@huawei.com>2017-10-03 16:17:47 +0530
commit78af232946c8534fa154bd0b425daf2bcac73e00 (patch)
tree17cacc7eda083ac7b4bed981bdc79023b1b8b77c /sliPluginUtils/provider/src/test
parentdd9e2cbc650434d7c0da1976f9eb1bfe161f721a (diff)
Add unit test for ccsdk/core
*Add a unit test for SliStringUtils This is to test substring method of SliStringUtils and improve code coverage Issue-Id: CCSDK-106 Change-Id: I73c5af3b036a92fdcb1d3d1be7eb0b3abc44fd5a Signed-off-by: surya-huawei <a.u.surya@huawei.com>
Diffstat (limited to 'sliPluginUtils/provider/src/test')
-rw-r--r--sliPluginUtils/provider/src/test/java/org/onap/ccsdk/sli/core/slipluginutils/SliStringUtilsTest.java12
1 files changed, 12 insertions, 0 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 96c6ae4ac..4fc8d1866 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
@@ -91,6 +91,18 @@ public class SliStringUtilsTest {
}
@Test
+ public final void testSubString() throws SvcLogicException {
+ param.put("string","splitatgivenindex");
+ param.put("begin-index","0");
+ param.put("end-index","5");
+ param.put("result","result");
+
+ stringUtils.substring(param, ctx);
+
+ assertEquals("split", ctx.getAttribute("result"));
+ }
+
+ @Test
public final void testQuotedOrNull() throws SvcLogicException {
//param.put("nullString",null);
assertEquals("NULL",SliStringUtils.quotedOrNULL(null));