aboutsummaryrefslogtreecommitdiff
path: root/test/org/traccar/protocol
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2015-12-17 20:43:07 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2015-12-18 21:35:30 +1300
commit7ccf052eec0d2d71903c99bd8620c2bbfa45f311 (patch)
treeb89969c6ed5c23432ef748e95faf7414139ec0da /test/org/traccar/protocol
parent5d974ea790397d0646f013e91c8d3b0829ffbd54 (diff)
downloadtrackermap-server-7ccf052eec0d2d71903c99bd8620c2bbfa45f311.tar.gz
trackermap-server-7ccf052eec0d2d71903c99bd8620c2bbfa45f311.tar.bz2
trackermap-server-7ccf052eec0d2d71903c99bd8620c2bbfa45f311.zip
Implement Arnavi communication protocol
Diffstat (limited to 'test/org/traccar/protocol')
-rw-r--r--test/org/traccar/protocol/ArnaviProtocolDecoderTest.java21
1 files changed, 21 insertions, 0 deletions
diff --git a/test/org/traccar/protocol/ArnaviProtocolDecoderTest.java b/test/org/traccar/protocol/ArnaviProtocolDecoderTest.java
new file mode 100644
index 000000000..31daedf24
--- /dev/null
+++ b/test/org/traccar/protocol/ArnaviProtocolDecoderTest.java
@@ -0,0 +1,21 @@
+package org.traccar.protocol;
+
+import org.junit.Test;
+import org.traccar.ProtocolTest;
+
+public class ArnaviProtocolDecoderTest extends ProtocolTest {
+
+ @Test
+ public void testDecode() throws Exception {
+
+ ArnaviProtocolDecoder decoder = new ArnaviProtocolDecoder(new ArnaviProtocol());
+
+ verifyPosition(decoder, text(
+ "$AV,V2,32768,12487,2277,203,-1,0,0,193,0,0,1,13,200741,5950.6773N,03029.1043E,0.0,0.0,121012,*6E"));
+
+ verifyPosition(decoder, text(
+ "$AV,V3,999999,12487,2277,203,65534,0,0,193,65535,65535,65535,65535,1,13,200741,5950.6773N,03029.1043E,300.0,360.0,121012,65535,65535,65535,SF*6E"));
+
+ }
+
+}