aboutsummaryrefslogtreecommitdiff
path: root/test/org
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2014-09-10 22:49:18 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2014-09-10 22:49:18 +1200
commit4f01c0906b74a9926d83befca46f8f6512730ec9 (patch)
tree2a0f0c03b3e5dccaf5ab3df9525672ffd1a98f09 /test/org
parent026f089951f03931138a1c6171699fcb9156da9c (diff)
downloadtrackermap-server-4f01c0906b74a9926d83befca46f8f6512730ec9.tar.gz
trackermap-server-4f01c0906b74a9926d83befca46f8f6512730ec9.tar.bz2
trackermap-server-4f01c0906b74a9926d83befca46f8f6512730ec9.zip
Implement Riti protocol
Diffstat (limited to 'test/org')
-rw-r--r--test/org/traccar/protocol/RitiProtocolDecoderTest.java24
1 files changed, 24 insertions, 0 deletions
diff --git a/test/org/traccar/protocol/RitiProtocolDecoderTest.java b/test/org/traccar/protocol/RitiProtocolDecoderTest.java
new file mode 100644
index 000000000..2f77a4fc1
--- /dev/null
+++ b/test/org/traccar/protocol/RitiProtocolDecoderTest.java
@@ -0,0 +1,24 @@
+package org.traccar.protocol;
+
+import java.nio.ByteOrder;
+import org.jboss.netty.buffer.ChannelBuffers;
+import static org.junit.Assert.assertNull;
+import org.junit.Test;
+import org.traccar.helper.ChannelBufferTools;
+import static org.traccar.helper.DecoderVerifier.verify;
+import org.traccar.helper.TestDataManager;
+
+public class RitiProtocolDecoderTest {
+
+ @Test
+ public void testDecode() throws Exception {
+
+ RitiProtocolDecoder decoder = new RitiProtocolDecoder(null);
+ decoder.setDataManager(new TestDataManager());
+
+ verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ByteOrder.LITTLE_ENDIAN, ChannelBufferTools.convertArray(
+ new int[] {0x3b,0x28,0x64,0xa3,0x05,0x63,0x00,0x00,0x6d,0x40,0x00,0x00,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x24,0x47,0x50,0x52,0x4d,0x43,0x2c,0x32,0x31,0x31,0x37,0x34,0x33,0x2e,0x30,0x30,0x30,0x2c,0x41,0x2c,0x31,0x33,0x35,0x37,0x2e,0x33,0x36,0x37,0x35,0x2c,0x4e,0x2c,0x31,0x30,0x30,0x33,0x36,0x2e,0x36,0x39,0x39,0x32,0x2c,0x45,0x2c,0x30,0x2e,0x30,0x30,0x2c,0x2c,0x30,0x31,0x30,0x39,0x31,0x34,0x2c,0x2c,0x2c,0x41,0x2a,0x37,0x38,0x0d,0x0a,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x04,0x04}))));
+
+ }
+
+}