diff options
author | surya-huawei <a.u.surya@huawei.com> | 2017-10-03 16:09:04 +0530 |
---|---|---|
committer | surya-huawei <a.u.surya@huawei.com> | 2017-10-03 16:17:47 +0530 |
commit | 78af232946c8534fa154bd0b425daf2bcac73e00 (patch) | |
tree | 17cacc7eda083ac7b4bed981bdc79023b1b8b77c | |
parent | dd9e2cbc650434d7c0da1976f9eb1bfe161f721a (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>
-rw-r--r-- | sliPluginUtils/provider/src/test/java/org/onap/ccsdk/sli/core/slipluginutils/SliStringUtilsTest.java | 12 |
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 96c6ae4a..4fc8d186 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)); |