aboutsummaryrefslogtreecommitdiffstats
path: root/asdc-controller/src/test/java
diff options
context:
space:
mode:
authorsubhash kumar singh <subhash.kumar.singh@huawei.com>2019-01-04 12:39:08 +0530
committersubhash kumar singh <subhash.kumar.singh@huawei.com>2019-01-08 22:10:09 +0100
commit2e5bd7ed14d30437ccd662be63fe117c9702d75f (patch)
treeedd5543c8223d70dab7cfe45c42037f40dc2a384 /asdc-controller/src/test/java
parent8a98627029dc451f3511182b5a56c5321f3b9b89 (diff)
Fix json parsing of resource input
Fix json parsing of resource input by adding escape character. Change-Id: Ic19bd5dae5eea25faaeae2df3eb0bcc29482ea7c Issue-ID: SO-1358 Signed-off-by: subhash kumar singh <subhash.kumar.singh@huawei.com>
Diffstat (limited to 'asdc-controller/src/test/java')
-rw-r--r--asdc-controller/src/test/java/org/onap/so/asdc/installer/heat/ToscaResourceInputTest.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/asdc-controller/src/test/java/org/onap/so/asdc/installer/heat/ToscaResourceInputTest.java b/asdc-controller/src/test/java/org/onap/so/asdc/installer/heat/ToscaResourceInputTest.java
index cecf70f916..e738235a0a 100644
--- a/asdc-controller/src/test/java/org/onap/so/asdc/installer/heat/ToscaResourceInputTest.java
+++ b/asdc-controller/src/test/java/org/onap/so/asdc/installer/heat/ToscaResourceInputTest.java
@@ -104,7 +104,7 @@ public class ToscaResourceInputTest {
when(property.getValue()).thenReturn("value1");
String resourceInput = toscaResourceInstaller.getResourceInput(toscaResourceStructure, "id1");
- assertEquals(resourceInput, "{\"prop1\":\"value1\"}");
+ assertEquals("{\\\"prop1\\\":\\\"value1\\\"}", resourceInput);
}
@Test
@@ -131,6 +131,6 @@ public class ToscaResourceInputTest {
when(input.getDefault()).thenReturn("default_value");
String resourceInput = toscaResourceInstaller.getResourceInput(toscaResourceStructure, "id1");
- assertEquals(resourceInput, "{\"prop1\":\"res_key|default_value\"}");
+ assertEquals("{\\\"prop1\\\":\\\"res_key|default_value\\\"}", resourceInput);
}
}