aboutsummaryrefslogtreecommitdiff
path: root/test/org/traccar/protocol
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2014-12-24 15:33:04 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2014-12-24 15:33:04 +1300
commit7dbd8dd192b1d48a8b26168763ecf29d97433319 (patch)
tree2ddbc8bec559ae2bcebf4a5d7f4e95a20c1499c7 /test/org/traccar/protocol
parent44e8c9ea649d9017621238dab033892b94494ba5 (diff)
downloadtraccar-server-7dbd8dd192b1d48a8b26168763ecf29d97433319.tar.gz
traccar-server-7dbd8dd192b1d48a8b26168763ecf29d97433319.tar.bz2
traccar-server-7dbd8dd192b1d48a8b26168763ecf29d97433319.zip
Initial Ulbotech implementation
Diffstat (limited to 'test/org/traccar/protocol')
-rw-r--r--test/org/traccar/protocol/UlbotechProtocolDecoderTest.java26
1 files changed, 26 insertions, 0 deletions
diff --git a/test/org/traccar/protocol/UlbotechProtocolDecoderTest.java b/test/org/traccar/protocol/UlbotechProtocolDecoderTest.java
new file mode 100644
index 000000000..a8b21c0b1
--- /dev/null
+++ b/test/org/traccar/protocol/UlbotechProtocolDecoderTest.java
@@ -0,0 +1,26 @@
+package org.traccar.protocol;
+
+import org.jboss.netty.buffer.ChannelBuffers;
+import org.junit.Test;
+import org.traccar.helper.ChannelBufferTools;
+import org.traccar.helper.TestDataManager;
+
+import static org.junit.Assert.assertNull;
+import static org.traccar.helper.DecoderVerifier.verify;
+
+public class UlbotechProtocolDecoderTest {
+
+ @Test
+ public void testDecode() throws Exception {
+
+ UlbotechProtocolDecoder decoder = new UlbotechProtocolDecoder(new TestDataManager(), null, null);
+
+ //verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertArray(
+ // new int[] {0xF8,0x01,0x01,0x08,0x63,0x07,0x00,0x18,0x98,0x72,0x98,0x72,0x96,0x19,0x02,0x27,0x01,0xCC,0x00,0x00,0x28,0x55,0x34,0xBA,0x4F,0x28,0x55,0x3A,0xB1,0x4C,0x28,0x55,0xBC,0x9C,0x57,0x28,0x55,0xBC,0x9D,0x5B,0x28,0x55,0x3A,0xB2,0x5C,0x28,0x55,0x44,0x58,0x61,0x28,0x55,0x44,0x58,0x63,0x03,0x04,0x00,0x00,0x00,0x00,0x04,0x04,0x00,0x00,0x07,0x6F,0x05,0x08,0x03,0x3A,0x18,0xCF,0x22,0x0D,0x3D,0xE6,0xA6,0x38,0xF8}))));
+
+ verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertArray(
+ new int[] {0xF8,0x01,0x01,0x03,0x57,0x85,0x20,0x34,0x57,0x28,0x94,0x95,0xD6,0x02,0x35,0x01,0x0E,0x01,0x61,0x75,0xA5,0x06,0xC2,0xC8,0x38,0x00,0x00,0x00,0x00,0x00,0x64}))));
+
+ }
+
+}