diff options
author | Fiete Ostkamp <Fiete.Ostkamp@telekom.de> | 2024-05-28 11:11:09 +0200 |
---|---|---|
committer | Fiete Ostkamp <Fiete.Ostkamp@telekom.de> | 2024-05-28 11:55:34 +0200 |
commit | fa42cc548fb2f002b4e94e79bcbf10fbd7bcfa6d (patch) | |
tree | d8d76d76780b69f48f13400885cc19d13ed48063 /aai-core/src/test | |
parent | 17cf0fc2bd8ead53beadafe0fda7605fbb27f618 (diff) |
Refactor HttpEntry class - Part 1
- simplify setHttpEntryProperties (later on this will likely be done in the constructor)
- move some logic of UEBNotification into separate methods
- resolve jsonassert dependency conflict
Issue-ID: AAI-3863
Signed-off-by: Fiete Ostkamp <Fiete.Ostkamp@telekom.de>
Change-Id: Ic84b43156890352509dc9c547478abdf53e96d6a
Diffstat (limited to 'aai-core/src/test')
-rw-r--r-- | aai-core/src/test/java/org/onap/aai/rest/db/HttpEntryTest.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/aai-core/src/test/java/org/onap/aai/rest/db/HttpEntryTest.java b/aai-core/src/test/java/org/onap/aai/rest/db/HttpEntryTest.java index 371c07a5..8d703d3b 100644 --- a/aai-core/src/test/java/org/onap/aai/rest/db/HttpEntryTest.java +++ b/aai-core/src/test/java/org/onap/aai/rest/db/HttpEntryTest.java @@ -196,7 +196,13 @@ public class HttpEntryTest extends AAISetup { .put("equip-type", "theEquipType") .toString(); + JSONObject expectedResponseBody = new JSONObject() + .put("hostname", "theHostname") + .put("equip-type", "theEquipType"); Response response = doRequest(traversalHttpEntry, loader, dbEngine, HttpMethod.GET, uri, requestBody); + JSONObject actualResponseBody = new JSONObject(response.getEntity().toString()); + + JSONAssert.assertEquals(expectedResponseBody, actualResponseBody, JSONCompareMode.NON_EXTENSIBLE); assertEquals("Expected the pserver to be returned", 200, response.getStatus()); } |