aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2013-08-17 22:35:30 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2013-08-17 22:35:30 +1200
commitf9210e4709188f7c344fe0dd94fe58b4a89307f8 (patch)
treed0f6f784e27d1d98fe76a11647d24672ffad84e8 /test
parent8cf628f7c70d12aeb3f54ad5363114e045863f2e (diff)
downloadtrackermap-server-f9210e4709188f7c344fe0dd94fe58b4a89307f8.tar.gz
trackermap-server-f9210e4709188f7c344fe0dd94fe58b4a89307f8.tar.bz2
trackermap-server-f9210e4709188f7c344fe0dd94fe58b4a89307f8.zip
Add Gator/Seeworld protocol (fix #217)
Diffstat (limited to 'test')
-rw-r--r--test/org/traccar/protocol/GatorProtocolDecoderTest.java21
1 files changed, 21 insertions, 0 deletions
diff --git a/test/org/traccar/protocol/GatorProtocolDecoderTest.java b/test/org/traccar/protocol/GatorProtocolDecoderTest.java
new file mode 100644
index 000000000..6f1d5b5ea
--- /dev/null
+++ b/test/org/traccar/protocol/GatorProtocolDecoderTest.java
@@ -0,0 +1,21 @@
+package org.traccar.protocol;
+
+import org.jboss.netty.buffer.ChannelBuffers;
+import static org.junit.Assert.assertNotNull;
+import org.junit.Test;
+import org.traccar.helper.ChannelBufferTools;
+
+public class GatorProtocolDecoderTest {
+
+ @Test
+ public void testDecode() throws Exception {
+
+ GatorProtocolDecoder decoder = new GatorProtocolDecoder(null);
+ decoder.setDataManager(new TestDataManager());
+
+ int[] buf1 = {0x24,0x24,0x81,0x00,0x23,0x0C,0xA2,0x32,0x85,0x10,0x03,0x06,0x14,0x59,0x07,0x02,0x23,0x46,0x90,0x11,0x35,0x29,0x47,0x00,0x00,0x00,0x00,0xC0,0x40,0x01,0x01,0x2C,0x0E,0x11,0x00,0x00,0x00,0x21,0xCB,0x0D};
+ assertNotNull(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertArray(buf1))));
+
+ }
+
+}