From d6c3c4fc1d59c34840f6e77253a2bf1b06ae1908 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Wed, 30 Jan 2013 23:00:40 +1300 Subject: Added Navigil protocol (fix #127) --- .../protocol/NavigilProtocolDecoderTest.java | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 test/org/traccar/protocol/NavigilProtocolDecoderTest.java (limited to 'test/org/traccar/protocol') 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))); + + } + +} -- cgit v1.2.3