summaryrefslogtreecommitdiffstats
path: root/sliPluginUtils/provider/src/test/java
diff options
context:
space:
mode:
authorSmokowski, Kevin (ks6305) <kevin.smokowski@att.com>2020-04-01 19:58:23 +0000
committerKevin Smokowski <kevin.smokowski@att.com>2020-04-01 20:14:01 +0000
commitb970a7b46fac32e626acfa23b1e2de9b22da7ff7 (patch)
tree3f885b81b623ecc4c9a7d9fec0d34c2292396fee /sliPluginUtils/provider/src/test/java
parent4cbff49506b31844ccda7ca38b3ba7283974475a (diff)
SliPluginUtils jsonStringToCtx fix
Support null values in jsonStringToCtx in Slipluginutils Issue-ID: CCSDK-2250 Signed-off-by: Smokowski, Kevin (ks6305) <kevin.smokowski@att.com> Change-Id: I3316fa9e80c9e684fc27d83356bbfad9b1151992
Diffstat (limited to 'sliPluginUtils/provider/src/test/java')
-rw-r--r--sliPluginUtils/provider/src/test/java/org/onap/ccsdk/sli/core/slipluginutils/SliPluginUtils_StaticFunctionsTest.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/sliPluginUtils/provider/src/test/java/org/onap/ccsdk/sli/core/slipluginutils/SliPluginUtils_StaticFunctionsTest.java b/sliPluginUtils/provider/src/test/java/org/onap/ccsdk/sli/core/slipluginutils/SliPluginUtils_StaticFunctionsTest.java
index ad039d7f4..bc2c9226d 100644
--- a/sliPluginUtils/provider/src/test/java/org/onap/ccsdk/sli/core/slipluginutils/SliPluginUtils_StaticFunctionsTest.java
+++ b/sliPluginUtils/provider/src/test/java/org/onap/ccsdk/sli/core/slipluginutils/SliPluginUtils_StaticFunctionsTest.java
@@ -335,7 +335,7 @@ public class SliPluginUtils_StaticFunctionsTest {
assertEquals("plain", ctx.getAttribute("testPath.[0].name"));
assertEquals("pizza", ctx.getAttribute("testPath.[0].type"));
assertEquals("true", ctx.getAttribute("testPath.[0].vegetarian"));
- assertEquals("2000", ctx.getAttribute("testPath.[1].calories"));
+ assertEquals(SliPluginUtils.CTX_NULL_VALUE, ctx.getAttribute("testPath.[1].calories"));
assertEquals("2", ctx.getAttribute("testPath.[1].id"));
assertEquals("Tuesday Special", ctx.getAttribute("testPath.[1].name"));
assertEquals("1", ctx.getAttribute("testPath.[1].topping[0].id"));
@@ -423,7 +423,8 @@ public class SliPluginUtils_StaticFunctionsTest {
assertEquals("apple", ctx.getAttribute("testPath.[0][0]"));
assertEquals("orange", ctx.getAttribute("testPath.[0][1]"));
assertEquals("banana", ctx.getAttribute("testPath.[0][2]"));
- assertEquals("3", ctx.getAttribute("testPath.[0]_length"));
+ assertEquals(SliPluginUtils.CTX_NULL_VALUE, ctx.getAttribute("testPath.[0][3]"));
+ assertEquals("4", ctx.getAttribute("testPath.[0]_length"));
assertEquals("squash", ctx.getAttribute("testPath.[1][0]"));
assertEquals("broccoli", ctx.getAttribute("testPath.[1][1]"));
assertEquals("cauliflower", ctx.getAttribute("testPath.[1][2]"));
@@ -488,7 +489,7 @@ public class SliPluginUtils_StaticFunctionsTest {
assertEquals("text1", ctx.getAttribute("testPath.widget.text.name"));
assertEquals("21", ctx.getAttribute("testPath.widget.text.size"));
assertEquals("bold", ctx.getAttribute("testPath.widget.text.style"));
- assertEquals("200", ctx.getAttribute("testPath.widget.text.vOffset"));
+ assertEquals(SliPluginUtils.CTX_NULL_VALUE, ctx.getAttribute("testPath.widget.text.vOffset"));
assertEquals("300", ctx.getAttribute("testPath.widget.window.height"));
assertEquals("main_window", ctx.getAttribute("testPath.widget.window.name"));
assertEquals("ONAP Widget", ctx.getAttribute("testPath.widget.window.title"));