aboutsummaryrefslogtreecommitdiff
path: root/test/org/traccar
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2016-09-15 06:53:37 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2016-09-15 06:53:37 +1200
commit49754dbd853cd35876d74d7d8781c97a3c1413f7 (patch)
tree8da7f3549b05959337df7e8c7d840945bcbca285 /test/org/traccar
parent4e0113f3901617fe0baa1ce2c9e50c5f34089f78 (diff)
downloadtrackermap-server-49754dbd853cd35876d74d7d8781c97a3c1413f7.tar.gz
trackermap-server-49754dbd853cd35876d74d7d8781c97a3c1413f7.tar.bz2
trackermap-server-49754dbd853cd35876d74d7d8781c97a3c1413f7.zip
Implement Arknav X8 series support
Diffstat (limited to 'test/org/traccar')
-rw-r--r--test/org/traccar/protocol/ArknavX8ProtocolDecoderTest.java33
1 files changed, 33 insertions, 0 deletions
diff --git a/test/org/traccar/protocol/ArknavX8ProtocolDecoderTest.java b/test/org/traccar/protocol/ArknavX8ProtocolDecoderTest.java
new file mode 100644
index 000000000..a28e71c64
--- /dev/null
+++ b/test/org/traccar/protocol/ArknavX8ProtocolDecoderTest.java
@@ -0,0 +1,33 @@
+package org.traccar.protocol;
+
+import org.junit.Test;
+import org.traccar.ProtocolTest;
+
+public class ArknavX8ProtocolDecoderTest extends ProtocolTest {
+
+ @Test
+ public void testDecode() throws Exception {
+
+ ArknavX8ProtocolDecoder decoder = new ArknavX8ProtocolDecoder(new ArknavX8Protocol());
+
+ verifyNothing(decoder, text(
+ "351856040005407,240101"));
+
+ verifyPosition(decoder, text(
+ "1R,110509053244,A,2457.9141N,12126.3321E,220.0,315,10.0,00000000"));
+
+ verifyNothing(decoder, text(
+ "2R,110509053244,837493,,998372,,,"));
+
+ verifyPosition(decoder, text(
+ "1G,110509053245,A,2457.9141N,12126.3192E,3.1,35,2.0,00000001"));
+
+ verifyPosition(decoder, text(
+ "1G,110509053246,A,2457.9121N,12126.3415E,2.0,288,1.7,00000000"));
+
+ verifyPosition(decoder, text(
+ "1M,110509053247,A,2457.9118N,12126.3522E,1.0,55,2.2,00000000"));
+
+ }
+
+}