aboutsummaryrefslogtreecommitdiff
path: root/test/org/traccar/protocol/EgtsProtocolDecoderTest.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2018-03-23 05:38:03 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2018-03-23 05:38:03 +1300
commitfeaa6e2f2816efad85bdb3a29e40bd2313e65475 (patch)
tree27685541898749a5cf15781dd227f062e4d053ec /test/org/traccar/protocol/EgtsProtocolDecoderTest.java
parent7e1da0e6223f1b07269fb3e43369e35c1f3baf3e (diff)
downloadtrackermap-server-feaa6e2f2816efad85bdb3a29e40bd2313e65475.tar.gz
trackermap-server-feaa6e2f2816efad85bdb3a29e40bd2313e65475.tar.bz2
trackermap-server-feaa6e2f2816efad85bdb3a29e40bd2313e65475.zip
Initial EGTS protocol implementation
Diffstat (limited to 'test/org/traccar/protocol/EgtsProtocolDecoderTest.java')
-rw-r--r--test/org/traccar/protocol/EgtsProtocolDecoderTest.java27
1 files changed, 27 insertions, 0 deletions
diff --git a/test/org/traccar/protocol/EgtsProtocolDecoderTest.java b/test/org/traccar/protocol/EgtsProtocolDecoderTest.java
new file mode 100644
index 000000000..9a3434bec
--- /dev/null
+++ b/test/org/traccar/protocol/EgtsProtocolDecoderTest.java
@@ -0,0 +1,27 @@
+package org.traccar.protocol;
+
+import org.junit.Test;
+import org.traccar.ProtocolTest;
+
+import java.nio.ByteOrder;
+
+public class EgtsProtocolDecoderTest extends ProtocolTest {
+
+ @Test
+ public void testDecode() throws Exception {
+
+ EgtsProtocolDecoder decoder = new EgtsProtocolDecoder(new EgtsProtocol());
+
+ verifyPositions(decoder, binary(ByteOrder.LITTLE_ENDIAN,
+ "0100020B0025003A5701C91A003A5701CD6E68490202101700CBB4740F7617FD924364104F116A0000000000010300001EC2"),
+ position("2018-03-21 05:38:19.000", true, 51.67569, 55.59189));
+
+ verifyPositions(decoder, binary(ByteOrder.LITTLE_ENDIAN,
+ "0100020B0079000000011F6A001424951CA5CB0F23B5740F020210180023B5740F0A301994DA9C524C9128000A000000100082000011040018110300120900000003150100E803001B0700010000340900001B0700420000000000001B0700430000000000001B0700440000000000001B0700450000000000001B0700460000000000008020"));
+
+ verifyPositions(decoder, binary(ByteOrder.LITTLE_ENDIAN,
+ "0100020B00F200000001D66A001224951CA5CB0FFCB4740F0202101800FCB4740F502119943D9F524C9119805C000000100084000011040018110300120900000003150100E803001B0700410000000000001B0700420000000000001B0700430000000000001B0700440000000000001B0700450000000000001B0700460000000000006A001324951CA5CB0F05B5740F020210180005B5740F222519942D9E524C9100008B000000100083000011040018110300120900000003160100E803001B0700010000310900001B0700420000000000001B0700430000000000001B0700440000000000001B0700450000000000001B070046000000000000134E"));
+
+ }
+
+}