aboutsummaryrefslogtreecommitdiff
path: root/src/test/java/org
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/java/org')
-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")));
+
+ }
+
+}