aboutsummaryrefslogtreecommitdiff
path: root/src/test/java/org/traccar/protocol/DmtHttpProtocolDecoderTest.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/java/org/traccar/protocol/DmtHttpProtocolDecoderTest.java')
-rw-r--r--src/test/java/org/traccar/protocol/DmtHttpProtocolDecoderTest.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/test/java/org/traccar/protocol/DmtHttpProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/DmtHttpProtocolDecoderTest.java
index bed56ba30..99760546f 100644
--- a/src/test/java/org/traccar/protocol/DmtHttpProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/DmtHttpProtocolDecoderTest.java
@@ -9,7 +9,10 @@ public class DmtHttpProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new DmtHttpProtocolDecoder(null);
+ var decoder = inject(new DmtHttpProtocolDecoder(null));
+
+ verifyAttributes(decoder, request(HttpMethod.POST, "/",
+ buffer("{\"date\":\"2021-12-12T16:04:52Z\",\"device\":{\"sn\":\"416581\",\"prod\":85,\"rev\":1,\"fw\":\"1.12\",\"iccid\":\"89011702278612797427\",\"imei\":\"351358810439486\"},\"sqn\":1549,\"reason\":42,\"counters\":[{\"id\":0,\"val\":5304},{\"id\":3,\"val\":3200},{\"id\":4,\"val\":5066},{\"id\":128,\"val\":1},{\"id\":129,\"val\":8},{\"id\":130,\"val\":0},{\"id\":131,\"val\":0},{\"id\":132,\"val\":0},{\"id\":134,\"val\":1},{\"id\":138,\"val\":0},{\"id\":139,\"val\":36},{\"id\":142,\"val\":1629023},{\"id\":145,\"val\":0},{\"id\":146,\"val\":1}]}")));
verifyAttributes(decoder, request(HttpMethod.POST, "/",
buffer("{\"date\":\"2021-10-04T18:15:47Z\",\"device\":{\"sn\":\"403809\",\"prod\":85,\"rev\":1,\"fw\":\"1.12\",\"iccid\":\"89011702278483601922\",\"imei\":\"352656106127312\"},\"sqn\":40927,\"reason\":11,\"analogues\":[{\"id\":1,\"val\":4265},{\"id\":3,\"val\":3800},{\"id\":4,\"val\":12},{\"id\":5,\"val\":4251}],\"inputs\":1,\"outputs\":0,\"status\":137}")));