aboutsummaryrefslogtreecommitdiff
path: root/src/test/java/org/traccar/protocol
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2020-12-21 20:26:39 -0800
committerAnton Tananaev <anton.tananaev@gmail.com>2020-12-21 20:26:39 -0800
commit5e0a1d14b9e626f9b4fc4ef619effbc764ad03e7 (patch)
tree40f69b8bdf75ad75d33d822bad31d4be9d990f4a /src/test/java/org/traccar/protocol
parenta09958e9c8511e211a760b02d7a6f2daca23029d (diff)
downloadtraccar-server-5e0a1d14b9e626f9b4fc4ef619effbc764ad03e7.tar.gz
traccar-server-5e0a1d14b9e626f9b4fc4ef619effbc764ad03e7.tar.bz2
traccar-server-5e0a1d14b9e626f9b4fc4ef619effbc764ad03e7.zip
Finish FM IOTM implementation
Diffstat (limited to 'src/test/java/org/traccar/protocol')
-rw-r--r--src/test/java/org/traccar/protocol/IotmProtocolDecoderTest.java11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/test/java/org/traccar/protocol/IotmProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/IotmProtocolDecoderTest.java
index 65fdb82e8..1c783b355 100644
--- a/src/test/java/org/traccar/protocol/IotmProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/IotmProtocolDecoderTest.java
@@ -1,5 +1,7 @@
package org.traccar.protocol;
+import io.netty.handler.codec.mqtt.MqttMessageBuilders;
+import io.netty.handler.codec.mqtt.MqttQoS;
import org.junit.Test;
import org.traccar.ProtocolTest;
@@ -10,6 +12,15 @@ public class IotmProtocolDecoderTest extends ProtocolTest {
IotmProtocolDecoder decoder = new IotmProtocolDecoder(null);
+ verifyNull(decoder, MqttMessageBuilders.connect().clientId(
+ "123456789012345").build());
+
+ verifyPositions(decoder, false, MqttMessageBuilders.publish().payload(binary(
+ "020208009188752DE7120300013A002000AD59050030B135030340030C300301A00302A00E00D0B9AB5B420334C04100001F060000320004072064008C000162002000C004476F6F440109002100AD59050030BA359B")).qos(MqttQoS.EXACTLY_ONCE).build());
+
+ verifyPositions(decoder, false, MqttMessageBuilders.publish().payload(binary(
+ "020208009188752DE71203000109002000AD590500309635F3")).qos(MqttQoS.EXACTLY_ONCE).build());
+
}
}