Skip to content
This repository has been archived by the owner on Jun 14, 2024. It is now read-only.

Commit

Permalink
#14 Remove "ConfigurationRequest"
Browse files Browse the repository at this point in the history
  • Loading branch information
baardl committed Sep 10, 2020
1 parent 639320e commit af295d1
Showing 1 changed file with 5 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ void findConfirmedCov() {
void verifyConfirmedCOVNotificationSingleProperty() {
String observedHex = "810a0025010400050f0109121c020200252c0000000039004e095519012e4441a4cccd2f4f";
String expectedJson = "{" +
" \"configurationRequest\": {" +
" \"observations\": [{" +
" \"observedAt\": \"2020-08-25T11:49:14.394374\"," +
" \"name\": \"PresentValue\"," +
Expand All @@ -38,8 +37,7 @@ void verifyConfirmedCOVNotificationSingleProperty() {
" \"objectId\": \"AnalogInput_0\"" +
" }," +
" \"value\": \"20.6\"" +
" }]" +
" }," +
" }]," +
" \"sender\": \"unknown\"," +
" \"service\": \"SubscribeCov\"" +
"}";
Expand All @@ -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) {
Expand Down

0 comments on commit af295d1

Please sign in to comment.