From dc79a5ce6d9776db30d357dfb16dff624db770dd Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Tue, 7 Mar 2017 08:12:17 +1300 Subject: Implement DMT protocol --- .../traccar/protocol/DmtProtocolDecoderTest.java | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 test/org/traccar/protocol/DmtProtocolDecoderTest.java (limited to 'test/org/traccar') diff --git a/test/org/traccar/protocol/DmtProtocolDecoderTest.java b/test/org/traccar/protocol/DmtProtocolDecoderTest.java new file mode 100644 index 000000000..fa43c661d --- /dev/null +++ b/test/org/traccar/protocol/DmtProtocolDecoderTest.java @@ -0,0 +1,23 @@ +package org.traccar.protocol; + +import org.junit.Test; +import org.traccar.ProtocolTest; + +import java.nio.ByteOrder; + +public class DmtProtocolDecoderTest extends ProtocolTest { + + @Test + public void testDecode() throws Exception { + + DmtProtocolDecoder decoder = new DmtProtocolDecoder(new DmtProtocol()); + + verifyNothing(decoder, binary(ByteOrder.LITTLE_ENDIAN, + "025500310038f90100333533333233303831363639373330003839363130313435363839393333303030303835002202010900000000")); + + verifyPositions(decoder, binary(ByteOrder.LITTLE_ENDIAN, + "0255043D003D004746000096D684020B001502D48402F043F4EC2A6909452B001F00050011230302080000000000000A00060F041D0001FE0F021E0005000003BF08")); + + } + +} -- cgit v1.2.3