From c2c27617fa4392c3a25a6c4ad62bd24060f1c0c1 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Tue, 21 May 2024 06:41:44 -0700 Subject: Handle Snapper protocol ping --- .../traccar/protocol/SnapperFrameDecoderTest.java | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 src/test/java/org/traccar/protocol/SnapperFrameDecoderTest.java (limited to 'src/test/java/org/traccar/protocol/SnapperFrameDecoderTest.java') 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"))); + + } + +} -- cgit v1.2.3