Skip to content

Commit

Permalink
Added a unit test for depositing a tim with extra properties.
Browse files Browse the repository at this point in the history
  • Loading branch information
dmccoystephenson committed Mar 29, 2023
1 parent c2f1ccb commit 2cb2bbc
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -160,4 +160,11 @@ public void testSuccessfulMessageReturnsSuccessMessagePut(@Capturing TimTransmog
assertEquals("{\"success\":\"true\"}", actualResponse.getBody());
}

@Test
public void testDepositingTimWithExtraProperties(@Capturing TimTransmogrifier capturingTimTransmogrifier, @Capturing XmlUtils capturingXmlUtils) {
String timToSubmit = "{\"request\":{\"rsus\":[],\"snmp\":{},\"randomProp1\":true,\"randomProp2\":\"hello world\"},\"tim\":{\"msgCnt\":\"13\",\"timeStamp\":\"2017-03-13T01:07:11-05:00\",\"randomProp3\":123,\"randomProp4\":{\"nestedProp1\":\"foo\",\"nestedProp2\":\"bar\"}}}";
ResponseEntity<String> actualResponse = testTimDepositController.postTim(timToSubmit);
assertEquals("{\"success\":\"true\"}", actualResponse.getBody());
}

}

0 comments on commit 2cb2bbc

Please sign in to comment.