aboutsummaryrefslogtreecommitdiff
path: root/test/org/traccar/protocol/NavigilProtocolDecoderTest.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2013-01-30 23:00:40 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2013-01-30 23:00:40 +1300
commitd6c3c4fc1d59c34840f6e77253a2bf1b06ae1908 (patch)
treedc026260edd417a20b45fe089cd9fbbb111696bc /test/org/traccar/protocol/NavigilProtocolDecoderTest.java
parent5f1a4ade9054a5958f5bb0815ac0d7a2a65fe6b9 (diff)
downloadtrackermap-server-d6c3c4fc1d59c34840f6e77253a2bf1b06ae1908.tar.gz
trackermap-server-d6c3c4fc1d59c34840f6e77253a2bf1b06ae1908.tar.bz2
trackermap-server-d6c3c4fc1d59c34840f6e77253a2bf1b06ae1908.zip
Added Navigil protocol (fix #127)
Diffstat (limited to 'test/org/traccar/protocol/NavigilProtocolDecoderTest.java')
-rw-r--r--test/org/traccar/protocol/NavigilProtocolDecoderTest.java22
1 files changed, 22 insertions, 0 deletions
diff --git a/test/org/traccar/protocol/NavigilProtocolDecoderTest.java b/test/org/traccar/protocol/NavigilProtocolDecoderTest.java
new file mode 100644
index 000000000..100e178d8
--- /dev/null
+++ b/test/org/traccar/protocol/NavigilProtocolDecoderTest.java
@@ -0,0 +1,22 @@
+package org.traccar.protocol;
+
+import java.nio.ByteOrder;
+import org.jboss.netty.buffer.ChannelBuffers;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import org.junit.Test;
+
+public class NavigilProtocolDecoderTest {
+
+ @Test
+ public void testDecode() throws Exception {
+
+ NavigilProtocolDecoder decoder = new NavigilProtocolDecoder(null);
+ decoder.setDataManager(new TestDataManager());
+
+ //byte[] buf1 = {0x40,0x4E,0x54,0x43,0x01,0x00,0x00,0x00,0x7B,0x00,0x00,0x00,0x13,0x00,0x44,0x34,0x2A,0x3E,0x53,0x3A,0x38,0x36,0x31,0x37,0x38,0x35,0x30,0x30,0x35,0x32,0x30,0x35,0x30,0x37,0x39};
+ //assertNull(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ByteOrder.LITTLE_ENDIAN, buf1)));
+
+ }
+
+}