From af295d1456692b0ea6c230cbe19240f6eb3e7a2d Mon Sep 17 00:00:00 2001 From: baardl Date: Thu, 10 Sep 2020 16:47:55 +0200 Subject: [PATCH] #14 Remove "ConfigurationRequest" --- .../bacnet/json/services/SubscriptionCovTest.java | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/test/java/no/entra/bacnet/json/services/SubscriptionCovTest.java b/src/test/java/no/entra/bacnet/json/services/SubscriptionCovTest.java index ab64576..7c3a932 100644 --- a/src/test/java/no/entra/bacnet/json/services/SubscriptionCovTest.java +++ b/src/test/java/no/entra/bacnet/json/services/SubscriptionCovTest.java @@ -29,7 +29,6 @@ void findConfirmedCov() { void verifyConfirmedCOVNotificationSingleProperty() { String observedHex = "810a0025010400050f0109121c020200252c0000000039004e095519012e4441a4cccd2f4f"; String expectedJson = "{" + - " \"configurationRequest\": {" + " \"observations\": [{" + " \"observedAt\": \"2020-08-25T11:49:14.394374\"," + " \"name\": \"PresentValue\"," + @@ -38,8 +37,7 @@ void verifyConfirmedCOVNotificationSingleProperty() { " \"objectId\": \"AnalogInput_0\"" + " }," + " \"value\": \"20.6\"" + - " }]" + - " }," + + " }]," + " \"sender\": \"unknown\"," + " \"service\": \"SubscribeCov\"" + "}"; @@ -55,10 +53,10 @@ void verifyConfirmedCOVNotificationSingleProperty() { //Hard to get JSONAssert to ignore observedAt. Hardcoding the test for now. assertEqualsPath(expectedJson, observedJson, "$.sender"); assertEqualsPath(expectedJson, observedJson, "$.service"); - assertEqualsPath(expectedJson, observedJson, "$.configurationRequest.observations[0].name"); - assertEqualsPath(expectedJson, observedJson, "$.configurationRequest.observations[0].source.deviceId"); - assertEqualsPath(expectedJson, observedJson, "$.configurationRequest.observations[0].source.objectId"); - assertEqualsPath(expectedJson, observedJson, "$.configurationRequest.observations[0].value"); + assertEqualsPath(expectedJson, observedJson, "$.observations[0].name"); + assertEqualsPath(expectedJson, observedJson, "$.observations[0].source.deviceId"); + assertEqualsPath(expectedJson, observedJson, "$.observations[0].source.objectId"); + assertEqualsPath(expectedJson, observedJson, "$.observations[0].value"); } void assertEqualsPath(String expectedJason, String observedJson, String jsonPath) {