aboutsummaryrefslogtreecommitdiffstats
path: root/bpmn/MSOCoreBPMN/src/test/java
diff options
context:
space:
mode:
Diffstat (limited to 'bpmn/MSOCoreBPMN/src/test/java')
-rw-r--r--bpmn/MSOCoreBPMN/src/test/java/org/onap/so/bpmn/core/json/JsonUtilsTest.java14
1 files changed, 13 insertions, 1 deletions
diff --git a/bpmn/MSOCoreBPMN/src/test/java/org/onap/so/bpmn/core/json/JsonUtilsTest.java b/bpmn/MSOCoreBPMN/src/test/java/org/onap/so/bpmn/core/json/JsonUtilsTest.java
index 6748128f05..067ae9806d 100644
--- a/bpmn/MSOCoreBPMN/src/test/java/org/onap/so/bpmn/core/json/JsonUtilsTest.java
+++ b/bpmn/MSOCoreBPMN/src/test/java/org/onap/so/bpmn/core/json/JsonUtilsTest.java
@@ -81,7 +81,19 @@ public class JsonUtilsTest {
JSONArray assignmentInfo = homingDataJson.getJSONArray("assignmentInfo");
Map<String, String> map = utils.entryArrayToMap(assignmentInfo.toString(), "variableName", "variableValue");
assertEquals(map.get("cloudOwner"), "CloudOwner");
- }
+ }
+ @Test
+ public void entryArrayToMapStringTestOof() throws IOException {
+ JsonUtils utils = new JsonUtils();
+ String response = this.getJson("OofExample.json");
+ String entry = JsonUtils.getJsonValue(response, "solutions.placementSolutions");
+ JSONArray arr = new JSONArray(entry);
+ JSONArray arr2 = arr.getJSONArray(0);
+ JSONObject homingDataJson = arr2.getJSONObject(0);
+ JSONArray assignmentInfo = homingDataJson.getJSONArray("assignmentInfo");
+ Map<String, String> map = utils.entryArrayToMap(assignmentInfo.toString(), "key", "value");
+ assertEquals(map.get("cloudOwner"), "HPA-cloud");
+ }
@Test
public void getJsonRootPropertyTest() throws IOException {
String response = this.getJson("SDNCServiceResponseExample.json");