From 7ee3f22184bfe4ed61f6a0eaf2f52116ac02b2ee Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Sat, 28 Oct 2017 18:20:08 +1300 Subject: Implement Recoda protocol --- .../protocol/RecodaProtocolDecoderTest.java | 26 ++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 test/org/traccar/protocol/RecodaProtocolDecoderTest.java (limited to 'test/org') diff --git a/test/org/traccar/protocol/RecodaProtocolDecoderTest.java b/test/org/traccar/protocol/RecodaProtocolDecoderTest.java new file mode 100644 index 000000000..69adb4905 --- /dev/null +++ b/test/org/traccar/protocol/RecodaProtocolDecoderTest.java @@ -0,0 +1,26 @@ +package org.traccar.protocol; + +import org.junit.Test; +import org.traccar.ProtocolTest; + +import java.nio.ByteOrder; + +public class RecodaProtocolDecoderTest extends ProtocolTest { + + @Test + public void testDecode() throws Exception { + + RecodaProtocolDecoder decoder = new RecodaProtocolDecoder(new RecodaProtocol()); + + verifyNull(decoder, binary(ByteOrder.LITTLE_ENDIAN, + "01100020480000000300000030393535360000000000000001000000303030303000000000000000000000000000000000000000006100004531313037353500ffffffffffff0000")); + + verifyNull(decoder, binary(ByteOrder.LITTLE_ENDIAN, + "01200020100000000300000002000000")); + + verifyNull(decoder, binary(ByteOrder.LITTLE_ENDIAN, + "0110000008000000")); + + } + +} -- cgit v1.2.3