Skip to content
Snippets Groups Projects
Commit d1de7b09 authored by Sören Henning's avatar Sören Henning
Browse files

Test against JSON string

parent 384de3d8
No related branches found
No related tags found
No related merge requests found
Pipeline #6090 passed
......@@ -45,8 +45,9 @@ public class HttpRecordSenderTest {
final ActivePowerRecord record = new ActivePowerRecord("my-id", 12345L, 12.34);
this.httpRecordSender.send(record);
final String expectedJson = "{\"identifier\":\"my-id\",\"timestamp\":12345,\"valueInW\":12.34}";
verify(exactly(1), postRequestedFor(urlEqualTo("/"))
.withRequestBody(equalTo(this.gson.toJson(record)))); // toJson
.withRequestBody(equalTo(expectedJson))); // toJson
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment