aboutsummaryrefslogtreecommitdiff
path: root/test/org
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2014-08-17 23:19:37 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2014-08-17 23:19:37 +1200
commita1139cdd6979964f93f67c53780d0d1398a2996e (patch)
tree2ee1f1d8ab769364b051a4d80ecf12f4064cecd7 /test/org
parent502706c2b3a3aa8f0f3b6d4d04ed892e126500fe (diff)
downloadtrackermap-server-a1139cdd6979964f93f67c53780d0d1398a2996e.tar.gz
trackermap-server-a1139cdd6979964f93f67c53780d0d1398a2996e.tar.bz2
trackermap-server-a1139cdd6979964f93f67c53780d0d1398a2996e.zip
Implement Visiontek VT86 protocol (fix #802)
Diffstat (limited to 'test/org')
-rw-r--r--test/org/traccar/protocol/VisiontekProtocolDecoderTest.java24
1 files changed, 24 insertions, 0 deletions
diff --git a/test/org/traccar/protocol/VisiontekProtocolDecoderTest.java b/test/org/traccar/protocol/VisiontekProtocolDecoderTest.java
new file mode 100644
index 000000000..40d32b3f9
--- /dev/null
+++ b/test/org/traccar/protocol/VisiontekProtocolDecoderTest.java
@@ -0,0 +1,24 @@
+package org.traccar.protocol;
+
+import org.traccar.helper.TestDataManager;
+import static org.traccar.helper.DecoderVerifier.verify;
+import static org.junit.Assert.assertNull;
+import org.junit.Test;
+
+public class VisiontekProtocolDecoderTest {
+
+ @Test
+ public void testDecode() throws Exception {
+
+ VisiontekProtocolDecoder decoder = new VisiontekProtocolDecoder(null);
+ decoder.setDataManager(new TestDataManager());
+
+ verify(decoder.decode(null, null,
+ "$1,AP09BU9397,861785006462448,20,06,14,15,03,28,17267339N,078279407E,060.0,073,0550,11,0,1,0,0,1,1,26,A,0000000000"));
+
+ assertNull(decoder.decode(null, null,
+ "$1,AP09BU9397,861785006462448,20,06,14,15,03,28,000000000,0000000000,000.0,000,0000,00,0,1,0,0,1,1,24,V,0000000000"));
+
+ }
+
+}