From 97c2d575107de9345ef0647e7d9b8739c7abc55f Mon Sep 17 00:00:00 2001 From: "Kalkere Ramesh, Sharan (sk720x)" Date: Fri, 7 Dec 2018 11:37:19 -0500 Subject: sdnc common tasks returns response fix the post200Test by returning the correct response fix the unit test that expected the json response fixed the sdnc common tasks to return json response Change-Id: I80392cbd9aa90955c47661eeee6c605c213525e7 Issue-ID: SO-1296 Signed-off-by: Kalkere Ramesh, Sharan (sk720x) --- .../test/java/org/onap/so/client/sdn/common/SdnCommonTasksTest.java | 3 ++- .../src/test/java/org/onap/so/client/sdnc/SDNCClientIT.java | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'bpmn/so-bpmn-tasks/src/test') diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/sdn/common/SdnCommonTasksTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/sdn/common/SdnCommonTasksTest.java index e30fe660c3..2636aec4a7 100644 --- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/sdn/common/SdnCommonTasksTest.java +++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/sdn/common/SdnCommonTasksTest.java @@ -60,12 +60,13 @@ public class SdnCommonTasksTest{ @Test public void validateSDNResponseTest() throws BadResponseException { + String jsonResponse = "{\"output\":{\"response-code\":\"0\",\"response-message\":\"success\"}}"; LinkedHashMap responseMap = new LinkedHashMap<>(); LinkedHashMap output = new LinkedHashMap<>(); output.put("response-code", "0"); output.put("response-message", "success"); responseMap.put("output", output); - assertEquals("success", sdnCommonTasks.validateSDNResponse(responseMap)); + assertEquals(jsonResponse, sdnCommonTasks.validateSDNResponse(responseMap)); } @Test diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/sdnc/SDNCClientIT.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/sdnc/SDNCClientIT.java index cc1c5c5329..9117b8ea64 100644 --- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/sdnc/SDNCClientIT.java +++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/sdnc/SDNCClientIT.java @@ -77,6 +77,6 @@ public class SDNCClientIT extends BaseIntegrationTest { .withHeader("Content-Type", "application/json").withBody(responseJson))); String response = SPY_sdncClient.post("", SDNCTopology.NETWORK); - JSONAssert.assertEquals("", response, false); + JSONAssert.assertEquals(responseJson, response, true); } } -- cgit 1.2.3-korg