aboutsummaryrefslogtreecommitdiff
path: root/test/org/traccar
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2015-11-06 09:59:54 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2015-11-06 09:59:54 +1300
commit8d178a2e33b18b2b236a305b03663c6777679c3b (patch)
treed96896a1375a428116f8459874827490a4327fa4 /test/org/traccar
parentd7e99c8c537a53e5d49c409983ef5147ef36e4e3 (diff)
downloadtrackermap-server-8d178a2e33b18b2b236a305b03663c6777679c3b.tar.gz
trackermap-server-8d178a2e33b18b2b236a305b03663c6777679c3b.tar.bz2
trackermap-server-8d178a2e33b18b2b236a305b03663c6777679c3b.zip
Implement TRV communication protocol
Diffstat (limited to 'test/org/traccar')
-rw-r--r--test/org/traccar/protocol/TrvProtocolDecoderTest.java28
1 files changed, 28 insertions, 0 deletions
diff --git a/test/org/traccar/protocol/TrvProtocolDecoderTest.java b/test/org/traccar/protocol/TrvProtocolDecoderTest.java
new file mode 100644
index 000000000..a8e9fdb04
--- /dev/null
+++ b/test/org/traccar/protocol/TrvProtocolDecoderTest.java
@@ -0,0 +1,28 @@
+package org.traccar.protocol;
+
+import org.junit.Test;
+import org.traccar.ProtocolDecoderTest;
+
+public class TrvProtocolDecoderTest extends ProtocolDecoderTest {
+
+ @Test
+ public void testDecode() throws Exception {
+
+ TrvProtocolDecoder decoder = new TrvProtocolDecoder(new TrvProtocol());
+
+ verifyNothing(decoder, text(
+ "TRVAP00353456789012345"));
+
+ verifyPosition(decoder, text(
+ "TRVAP01080524A2232.9806N11404.9355E000.1061830323.8706000908000102,460,0,9520,3671"));
+
+ verifyPosition(decoder, text(
+ "TRVAP01080524A2232.9806N11404.9355E000.1061830323.8706000908000102,460,0,9520,3671"),
+ position("2008-05-24 06:18:30.000", true, 22.54968, 114.08226));
+
+ verifyPosition(decoder, text(
+ "TRVAP10080524A2232.9806N11404.9355E000.1061830323.8706000908000502,460,0,9520,3671,00,zh-cn,00"));
+
+ }
+
+}