aboutsummaryrefslogtreecommitdiff
path: root/test/org/traccar/protocol
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2014-08-27 22:12:39 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2014-08-27 22:12:39 +1200
commit2ba8c5218542ff71ff4087ddaefffa0fb572024d (patch)
treed8f1c605bdc6ba863d16f2444862691fbbc3c43c /test/org/traccar/protocol
parent6522fd1027e086c2708757792f2c8e44d4597908 (diff)
downloadtrackermap-server-2ba8c5218542ff71ff4087ddaefffa0fb572024d.tar.gz
trackermap-server-2ba8c5218542ff71ff4087ddaefffa0fb572024d.tar.bz2
trackermap-server-2ba8c5218542ff71ff4087ddaefffa0fb572024d.zip
Start Orion implementation
Diffstat (limited to 'test/org/traccar/protocol')
-rw-r--r--test/org/traccar/protocol/OrionProtocolDecoderTest.java30
1 files changed, 30 insertions, 0 deletions
diff --git a/test/org/traccar/protocol/OrionProtocolDecoderTest.java b/test/org/traccar/protocol/OrionProtocolDecoderTest.java
new file mode 100644
index 000000000..1d5e8f454
--- /dev/null
+++ b/test/org/traccar/protocol/OrionProtocolDecoderTest.java
@@ -0,0 +1,30 @@
+package org.traccar.protocol;
+
+import org.traccar.helper.TestDataManager;
+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;
+
+public class OrionProtocolDecoderTest {
+
+ @Test
+ public void testDecode() throws Exception {
+
+ OrionProtocolDecoder decoder = new OrionProtocolDecoder(null);
+ decoder.setDataManager(new TestDataManager());
+/*
+ verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ByteOrder.LITTLE_ENDIAN, ChannelBufferTools.convertArray(
+ new int[] {0x50,0x57,0x00,0x41,0x07,0x36,0x7C,0x24,0x2B,0x44,0x09,0x01,0xAD,0xE9,0x7D,0x01,0x63,0x14,0x3B,0x07,0xB0,0x03,0x00,0x00,0x00,0x00,0x0D,0x04,0x19,0x17,0x38,0x2D,0x00,0x0B,0x01,0x01,0x00,0x05,0x11,0x00,0x00,0x00,0x00,0x06,0x82,0x05,0x00,0x00,0x00,0x8E,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x8C,0x03,0x00,0x84,0x03,0x00,0x85,0x03,0x00,0x09,0x0A,0x00,0x00,0x00,0x00,0x48,0x01,0x00,0x00,0x00,0x8A,0xFC}))));
+
+ verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ByteOrder.LITTLE_ENDIAN, ChannelBufferTools.convertArray(
+ new int[] {0x50,0x57,0x00,0x41,0x07,0x36,0x7C,0x24,0x2C,0x44,0x09,0x01,0xAD,0xE9,0x7D,0x01,0x63,0x14,0x3B,0x07,0xB0,0x03,0x00,0x00,0x00,0x00,0x0D,0x04,0x19,0x17,0x38,0x2D,0x00,0x0B,0x01,0x01,0x00,0x05,0x13,0x00,0x00,0x00,0x00,0x06,0x82,0x05,0x00,0x00,0x00,0x8E,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x8C,0x03,0x00,0x84,0x03,0x00,0x85,0x03,0x00,0x09,0x0A,0x00,0x00,0x00,0x00,0x3B,0xFE,0xFF,0xFF,0x01,0xFA,0xE5}))));
+
+ verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ByteOrder.LITTLE_ENDIAN, ChannelBufferTools.convertArray(
+ new int[] {0x50,0x57,0x00,0x41,0x07,0x36,0x7C,0x24,0x2D,0x44,0x09,0x01,0xAD,0xE9,0x7D,0x01,0x63,0x14,0x3B,0x07,0xB0,0x03,0x00,0x00,0x00,0x00,0x0D,0x04,0x19,0x17,0x38,0x2D,0x00,0x0B,0x01,0x01,0x00,0x05,0x14,0x00,0x00,0x00,0x00,0x06,0x82,0x05,0x00,0x00,0x00,0x8E,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x8C,0x03,0x00,0x84,0x03,0x00,0x85,0x03,0x00,0x09,0x0A,0x00,0x00,0x00,0x00,0xFD,0xFD,0xFF,0xFF,0x02,0x37,0x21}))));
+*/
+ }
+
+}