summaryrefslogtreecommitdiffstats
path: root/sliPluginUtils/provider/src/test
diff options
context:
space:
mode:
authorDan Timoney <dtimoney@att.com>2020-06-16 10:15:13 -0400
committerDan Timoney <dtimoney@att.com>2020-06-19 08:00:50 -0400
commit95cf22da1854a991c756e46240cbab52a33eaa84 (patch)
tree8b3a311c2f75c0bc20db2dbd498639bca637a4ab /sliPluginUtils/provider/src/test
parent1f0a87b2f2a38e868ce5b6dee6dc1355a5284819 (diff)
Implement new method to convert SvcLogicContext to JSON
Added new method toJsonString() to SvcLogicContext class to write out service logic context properties as a JSON string Refactored static method SliPluginUtils.writeJsonToCtx to SvcLogicContext.mergeJson method Change-Id: I4fe134976f93c7d116bc54ad2bae6e486c6fac2c Issue-ID: CCSDK-1760 Signed-off-by: Dan Timoney <dtimoney@att.com>
Diffstat (limited to 'sliPluginUtils/provider/src/test')
-rw-r--r--sliPluginUtils/provider/src/test/java/org/onap/ccsdk/sli/core/slipluginutils/SliPluginUtils_StaticFunctionsTest.java13
1 files changed, 0 insertions, 13 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 bc2c9226d..42e7ceb94 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
@@ -284,19 +284,6 @@ public class SliPluginUtils_StaticFunctionsTest {
}
@Test
- public void testWriteJsonObject() throws SvcLogicException {
- JsonObject obj = new JsonObject();
- obj.addProperty("name", "testName");
- obj.addProperty("age", 27);
- obj.addProperty("salary", 600000);
- SvcLogicContext ctx = new SvcLogicContext();
- SliPluginUtils.writeJsonObject(obj, ctx, "root");
- assertEquals("testName", ctx.getAttribute("root.name"));
- assertEquals("27", ctx.getAttribute("root.age"));
- assertEquals("600000", ctx.getAttribute("root.salary"));
- }
-
- @Test
public void testCtxKeyEmpty() {
ctx.setAttribute("key", "");
assertTrue(SliPluginUtils.ctxKeyEmpty(ctx, "key"));