aboutsummaryrefslogtreecommitdiff
path: root/src/test/java/org/traccar/protocol/Pt215FrameDecoderTest.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2019-09-30 23:34:10 -0700
committerAnton Tananaev <anton.tananaev@gmail.com>2019-09-30 23:34:10 -0700
commit14f5711c4966f8fa38a49a5c9b62c7148ece06de (patch)
tree4ec985a8d1fa05969b4c2a08a85ac029d89dde8b /src/test/java/org/traccar/protocol/Pt215FrameDecoderTest.java
parent95d9122a4f5ac22ea25d2eb555beab11fd2c3408 (diff)
downloadtrackermap-server-14f5711c4966f8fa38a49a5c9b62c7148ece06de.tar.gz
trackermap-server-14f5711c4966f8fa38a49a5c9b62c7148ece06de.tar.bz2
trackermap-server-14f5711c4966f8fa38a49a5c9b62c7148ece06de.zip
Add PT215 frame decoder
Diffstat (limited to 'src/test/java/org/traccar/protocol/Pt215FrameDecoderTest.java')
-rw-r--r--src/test/java/org/traccar/protocol/Pt215FrameDecoderTest.java27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/test/java/org/traccar/protocol/Pt215FrameDecoderTest.java b/src/test/java/org/traccar/protocol/Pt215FrameDecoderTest.java
new file mode 100644
index 000000000..2e3600b99
--- /dev/null
+++ b/src/test/java/org/traccar/protocol/Pt215FrameDecoderTest.java
@@ -0,0 +1,27 @@
+package org.traccar.protocol;
+
+import org.junit.Test;
+import org.traccar.ProtocolTest;
+
+public class Pt215FrameDecoderTest extends ProtocolTest {
+
+ @Test
+ public void testDecode() throws Exception {
+
+ Pt215FrameDecoder decoder = new Pt215FrameDecoder();
+
+ verifyFrame(
+ binary("58580d010359339075799656010d0a"),
+ decoder.decode(null, null, binary("58580d010359339075799656010d0a")));
+
+ verifyFrame(
+ binary("5858071340010819640d0a"),
+ decoder.decode(null, null, binary("5858071340010819640d0a")));
+
+ verifyFrame(
+ binary("585815101309160d0f0c9902b7015405f0e82404347afff7000d0a"),
+ decoder.decode(null, null, binary("585815101309160d0f0c9902b7015405f0e82404347afff7000d0a")));
+
+ }
+
+}