aboutsummaryrefslogtreecommitdiff
path: root/test/org/traccar/protocol
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2017-03-07 08:12:17 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2017-03-07 08:12:17 +1300
commitdc79a5ce6d9776db30d357dfb16dff624db770dd (patch)
treedf4d220a8d7fdacd60f5269875b77dec7161db86 /test/org/traccar/protocol
parentcbb28de69d4da85b3baff9967549d35952164a31 (diff)
downloadtrackermap-server-dc79a5ce6d9776db30d357dfb16dff624db770dd.tar.gz
trackermap-server-dc79a5ce6d9776db30d357dfb16dff624db770dd.tar.bz2
trackermap-server-dc79a5ce6d9776db30d357dfb16dff624db770dd.zip
Implement DMT protocol
Diffstat (limited to 'test/org/traccar/protocol')
-rw-r--r--test/org/traccar/protocol/DmtProtocolDecoderTest.java23
1 files changed, 23 insertions, 0 deletions
diff --git a/test/org/traccar/protocol/DmtProtocolDecoderTest.java b/test/org/traccar/protocol/DmtProtocolDecoderTest.java
new file mode 100644
index 000000000..fa43c661d
--- /dev/null
+++ b/test/org/traccar/protocol/DmtProtocolDecoderTest.java
@@ -0,0 +1,23 @@
+package org.traccar.protocol;
+
+import org.junit.Test;
+import org.traccar.ProtocolTest;
+
+import java.nio.ByteOrder;
+
+public class DmtProtocolDecoderTest extends ProtocolTest {
+
+ @Test
+ public void testDecode() throws Exception {
+
+ DmtProtocolDecoder decoder = new DmtProtocolDecoder(new DmtProtocol());
+
+ verifyNothing(decoder, binary(ByteOrder.LITTLE_ENDIAN,
+ "025500310038f90100333533333233303831363639373330003839363130313435363839393333303030303835002202010900000000"));
+
+ verifyPositions(decoder, binary(ByteOrder.LITTLE_ENDIAN,
+ "0255043D003D004746000096D684020B001502D48402F043F4EC2A6909452B001F00050011230302080000000000000A00060F041D0001FE0F021E0005000003BF08"));
+
+ }
+
+}