aboutsummaryrefslogtreecommitdiff
path: root/test/org/traccar/protocol
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2017-06-20 05:57:16 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2017-06-20 05:57:17 +1200
commit8ab0f580a24851454ec4a763d81363cc968c78a1 (patch)
treefbcf9a4b9164ac6d21cef9880c7a8353d9e08cc9 /test/org/traccar/protocol
parent00fe22af967682a17f86d90108cc76bfc3503b1f (diff)
downloadtrackermap-server-8ab0f580a24851454ec4a763d81363cc968c78a1.tar.gz
trackermap-server-8ab0f580a24851454ec4a763d81363cc968c78a1.tar.bz2
trackermap-server-8ab0f580a24851454ec4a763d81363cc968c78a1.zip
Implement VTFMS protocol
Diffstat (limited to 'test/org/traccar/protocol')
-rw-r--r--test/org/traccar/protocol/VtfmsFrameDecoderTest.java20
-rw-r--r--test/org/traccar/protocol/VtfmsProtocolDecoderTest.java18
2 files changed, 38 insertions, 0 deletions
diff --git a/test/org/traccar/protocol/VtfmsFrameDecoderTest.java b/test/org/traccar/protocol/VtfmsFrameDecoderTest.java
new file mode 100644
index 000000000..e5897549b
--- /dev/null
+++ b/test/org/traccar/protocol/VtfmsFrameDecoderTest.java
@@ -0,0 +1,20 @@
+package org.traccar.protocol;
+
+import org.junit.Assert;
+import org.junit.Test;
+import org.traccar.ProtocolTest;
+
+public class VtfmsFrameDecoderTest extends ProtocolTest {
+
+ @Test
+ public void testDecode() throws Exception {
+
+ VtfmsFrameDecoder decoder = new VtfmsFrameDecoder();
+
+ Assert.assertEquals(
+ buffer("(863071010087648,0HK44,00,000,14,2,9,,A,114946,180313,11.0244,076.9768,282,000,00000,00000,K,0000128,1,12.8,,200,2.501,,4.001,0,0,0,0,0,0,0,,)105"),
+ decoder.decode(null, null, buffer("(863071010087648,0HK44,00,000,14,2,9,,A,114946,180313,11.0244,076.9768,282,000,00000,00000,K,0000128,1,12.8,,200,2.501,,4.001,0,0,0,0,0,0,0,,)105")));
+
+ }
+
+}
diff --git a/test/org/traccar/protocol/VtfmsProtocolDecoderTest.java b/test/org/traccar/protocol/VtfmsProtocolDecoderTest.java
new file mode 100644
index 000000000..a08bfb926
--- /dev/null
+++ b/test/org/traccar/protocol/VtfmsProtocolDecoderTest.java
@@ -0,0 +1,18 @@
+package org.traccar.protocol;
+
+import org.junit.Test;
+import org.traccar.ProtocolTest;
+
+public class VtfmsProtocolDecoderTest extends ProtocolTest {
+
+ @Test
+ public void testDecode() throws Exception {
+
+ VtfmsProtocolDecoder decoder = new VtfmsProtocolDecoder(new VtfmsProtocol());
+
+ verifyPosition(decoder, text(
+ "(863071010087648,0HK44,00,000,14,2,9,,A,114946,180313,11.0244,076.9768,282,000,00000,00000,K,0000128,1,12.8,,200,2.501,,4.001,0,0,0,0,0,0,0,,)105"));
+
+ }
+
+}