From 14f5711c4966f8fa38a49a5c9b62c7148ece06de Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Mon, 30 Sep 2019 23:34:10 -0700 Subject: Add PT215 frame decoder --- .../traccar/protocol/Pt215FrameDecoderTest.java | 27 ++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 src/test/java/org/traccar/protocol/Pt215FrameDecoderTest.java (limited to 'src/test/java') 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"))); + + } + +} -- cgit v1.2.3