aboutsummaryrefslogtreecommitdiff
path: root/src/test/java/org/traccar/protocol/SnapperFrameDecoderTest.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2024-05-21 06:41:44 -0700
committerAnton Tananaev <anton@traccar.org>2024-05-21 06:41:44 -0700
commitc2c27617fa4392c3a25a6c4ad62bd24060f1c0c1 (patch)
tree537f577aa32a5e7c484b4afb0b5c02c1b35eaab3 /src/test/java/org/traccar/protocol/SnapperFrameDecoderTest.java
parent445a2c5d0763bb42880ff1f9db93d755f6fdfa62 (diff)
downloadtrackermap-server-c2c27617fa4392c3a25a6c4ad62bd24060f1c0c1.tar.gz
trackermap-server-c2c27617fa4392c3a25a6c4ad62bd24060f1c0c1.tar.bz2
trackermap-server-c2c27617fa4392c3a25a6c4ad62bd24060f1c0c1.zip
Handle Snapper protocol ping
Diffstat (limited to 'src/test/java/org/traccar/protocol/SnapperFrameDecoderTest.java')
-rw-r--r--src/test/java/org/traccar/protocol/SnapperFrameDecoderTest.java23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/test/java/org/traccar/protocol/SnapperFrameDecoderTest.java b/src/test/java/org/traccar/protocol/SnapperFrameDecoderTest.java
new file mode 100644
index 000000000..260a18032
--- /dev/null
+++ b/src/test/java/org/traccar/protocol/SnapperFrameDecoderTest.java
@@ -0,0 +1,23 @@
+package org.traccar.protocol;
+
+import org.junit.jupiter.api.Test;
+import org.traccar.ProtocolTest;
+
+public class SnapperFrameDecoderTest extends ProtocolTest {
+
+ @Test
+ public void testDecode() throws Exception {
+
+ var decoder = inject(new SnapperFrameDecoder());
+
+ verifyFrame(
+ binary("4b0341a6b0c608000040000005000000000000007d5e14010068656c6c6f"),
+ decoder.decode(null, null, binary("4b0341a6b0c608000040000005000000000000007d5e14010068656c6c6f")));
+
+ verifyFrame(
+ binary("5012"),
+ decoder.decode(null, null, binary("5012")));
+
+ }
+
+}