From d8b7a6a745bf861c896360950a6e4d41742cb9b4 Mon Sep 17 00:00:00 2001 From: surya-huawei Date: Tue, 26 Sep 2017 13:01:50 +0530 Subject: Add unit test for SliStringUtils *Made quotedOrNull method public This is done for accessing this in ut *Added a unit test for the SliStringUtils.quotedOrNull() This is done for increasing code coverage Issue-Id: CCSDK-106 Change-Id: I9d74c6645256227b23beded5179fbb28ac3d3c04 Signed-off-by: surya-huawei --- .../org/onap/ccsdk/sli/core/slipluginutils/SliStringUtilsTest.java | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'sliPluginUtils/provider/src/test/java/org') 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 72b3264e9..96c6ae4ac 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 @@ -90,6 +90,12 @@ public class SliStringUtilsTest { assertThat(ctx.getAttribute("result_length"), equalTo("2")); } + @Test + public final void testQuotedOrNull() throws SvcLogicException { + //param.put("nullString",null); + assertEquals("NULL",SliStringUtils.quotedOrNULL(null)); + } + @Test public void equalsIgnoreCaseTrue() throws SvcLogicException { String sourceString = "HeLlOwORLD"; -- cgit 1.2.3-korg