aboutsummaryrefslogtreecommitdiff
path: root/src/test/java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2021-12-13 22:19:47 -0800
committerAnton Tananaev <anton.tananaev@gmail.com>2021-12-13 22:19:47 -0800
commit5a2baafba92958c82b81873dae19c5df7e793eea (patch)
tree9ac3f036da53612cfb9aa989c616895418053c3e /src/test/java
parentf910e56a45a4adc08287b6674d011bd25ea52b27 (diff)
downloadtrackermap-server-5a2baafba92958c82b81873dae19c5df7e793eea.tar.gz
trackermap-server-5a2baafba92958c82b81873dae19c5df7e793eea.tar.bz2
trackermap-server-5a2baafba92958c82b81873dae19c5df7e793eea.zip
Handle missing parameters
Diffstat (limited to 'src/test/java')
-rw-r--r--src/test/java/org/traccar/protocol/DmtHttpProtocolDecoderTest.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/test/java/org/traccar/protocol/DmtHttpProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/DmtHttpProtocolDecoderTest.java
index bed56ba30..31d0efa12 100644
--- a/src/test/java/org/traccar/protocol/DmtHttpProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/DmtHttpProtocolDecoderTest.java
@@ -12,6 +12,9 @@ public class DmtHttpProtocolDecoderTest extends ProtocolTest {
var decoder = 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}")));
verifyPosition(decoder, request(HttpMethod.POST, "/",