diff options
Diffstat (limited to 'sliPluginUtils/provider/src')
2 files changed, 7 insertions, 1 deletions
diff --git a/sliPluginUtils/provider/src/main/java/org/onap/ccsdk/sli/core/slipluginutils/SliStringUtils.java b/sliPluginUtils/provider/src/main/java/org/onap/ccsdk/sli/core/slipluginutils/SliStringUtils.java index 6048c66d..0c43f685 100644 --- a/sliPluginUtils/provider/src/main/java/org/onap/ccsdk/sli/core/slipluginutils/SliStringUtils.java +++ b/sliPluginUtils/provider/src/main/java/org/onap/ccsdk/sli/core/slipluginutils/SliStringUtils.java @@ -100,7 +100,7 @@ public class SliStringUtils implements SvcLogicJavaPlugin { } } - private static String quotedOrNULL( String str ) { + public static String quotedOrNULL( String str ) { return (str == null) ? "NULL" : '"' + str + '"'; } 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 72b3264e..96c6ae4a 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,12 @@ public class SliStringUtilsTest { } @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"; String targetSTring = "HELLOWORLD"; |