diff options
author | Ivan Muratov <binakot@gmail.com> | 2017-07-11 15:57:20 +0300 |
---|---|---|
committer | Ivan Muratov <binakot@gmail.com> | 2017-07-11 15:57:20 +0300 |
commit | 2e0ed3ccfde8f779111de2b722a94224faa65c99 (patch) | |
tree | 6b5c5f02bba4e36efcb802c48a8054588f168735 /test/org/traccar/protocol | |
parent | 85f7eae47ec4bf6b269305a05a696f9acce31fd5 (diff) | |
download | trackermap-server-2e0ed3ccfde8f779111de2b722a94224faa65c99.tar.gz trackermap-server-2e0ed3ccfde8f779111de2b722a94224faa65c99.tar.bz2 trackermap-server-2e0ed3ccfde8f779111de2b722a94224faa65c99.zip |
Create duplicate of ARNAVI3 protocol implementation.
Add an entry with ARNAVI4 port to the properties in default.xml.
Diffstat (limited to 'test/org/traccar/protocol')
-rw-r--r-- | test/org/traccar/protocol/Arnavi4ProtocolDecoderTest.java | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/test/org/traccar/protocol/Arnavi4ProtocolDecoderTest.java b/test/org/traccar/protocol/Arnavi4ProtocolDecoderTest.java new file mode 100644 index 000000000..b199fe565 --- /dev/null +++ b/test/org/traccar/protocol/Arnavi4ProtocolDecoderTest.java @@ -0,0 +1,26 @@ +package org.traccar.protocol; + +import org.junit.Test; +import org.traccar.ProtocolTest; + +import static org.junit.Assert.*; + +/** + * Created by Ivan Muratov @binakot on 11.07.2017. + */ +public class Arnavi4ProtocolDecoderTest extends ProtocolTest { + + @Test + public void testDecode() throws Exception { + + Arnavi4ProtocolDecoder decoder = new Arnavi4ProtocolDecoder(new Arnavi4Protocol()); + + 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")); + + } + +} |