aboutsummaryrefslogtreecommitdiff
path: root/test/org/traccar/protocol/RecodaProtocolDecoderTest.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2017-10-28 18:20:08 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2017-10-28 18:20:08 +1300
commit7ee3f22184bfe4ed61f6a0eaf2f52116ac02b2ee (patch)
treec04cdc743c3a438ee2c25e86215a6dbee432e0d4 /test/org/traccar/protocol/RecodaProtocolDecoderTest.java
parentdb6fd89ae6c85056bd90bc325689be7d11ed5b75 (diff)
downloadtrackermap-server-7ee3f22184bfe4ed61f6a0eaf2f52116ac02b2ee.tar.gz
trackermap-server-7ee3f22184bfe4ed61f6a0eaf2f52116ac02b2ee.tar.bz2
trackermap-server-7ee3f22184bfe4ed61f6a0eaf2f52116ac02b2ee.zip
Implement Recoda protocol
Diffstat (limited to 'test/org/traccar/protocol/RecodaProtocolDecoderTest.java')
-rw-r--r--test/org/traccar/protocol/RecodaProtocolDecoderTest.java26
1 files changed, 26 insertions, 0 deletions
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"));
+
+ }
+
+}