diff options
author | Anton Tananaev <anton@traccar.org> | 2024-05-21 06:41:44 -0700 |
---|---|---|
committer | Anton Tananaev <anton@traccar.org> | 2024-05-21 06:41:44 -0700 |
commit | c2c27617fa4392c3a25a6c4ad62bd24060f1c0c1 (patch) | |
tree | 537f577aa32a5e7c484b4afb0b5c02c1b35eaab3 /src/test/java/org/traccar/protocol/SnapperFrameDecoderTest.java | |
parent | 445a2c5d0763bb42880ff1f9db93d755f6fdfa62 (diff) | |
download | trackermap-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.java | 23 |
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"))); + + } + +} |