aboutsummaryrefslogtreecommitdiff
path: root/test/org/traccar/protocol/RitiProtocolDecoderTest.java
diff options
context:
space:
mode:
Diffstat (limited to 'test/org/traccar/protocol/RitiProtocolDecoderTest.java')
-rw-r--r--test/org/traccar/protocol/RitiProtocolDecoderTest.java24
1 files changed, 24 insertions, 0 deletions
diff --git a/test/org/traccar/protocol/RitiProtocolDecoderTest.java b/test/org/traccar/protocol/RitiProtocolDecoderTest.java
new file mode 100644
index 000000000..2f77a4fc1
--- /dev/null
+++ b/test/org/traccar/protocol/RitiProtocolDecoderTest.java
@@ -0,0 +1,24 @@
+package org.traccar.protocol;
+
+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;
+import org.traccar.helper.TestDataManager;
+
+public class RitiProtocolDecoderTest {
+
+ @Test
+ public void testDecode() throws Exception {
+
+ RitiProtocolDecoder decoder = new RitiProtocolDecoder(null);
+ decoder.setDataManager(new TestDataManager());
+
+ verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ByteOrder.LITTLE_ENDIAN, ChannelBufferTools.convertArray(
+ new int[] {0x3b,0x28,0x64,0xa3,0x05,0x63,0x00,0x00,0x6d,0x40,0x00,0x00,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x24,0x47,0x50,0x52,0x4d,0x43,0x2c,0x32,0x31,0x31,0x37,0x34,0x33,0x2e,0x30,0x30,0x30,0x2c,0x41,0x2c,0x31,0x33,0x35,0x37,0x2e,0x33,0x36,0x37,0x35,0x2c,0x4e,0x2c,0x31,0x30,0x30,0x33,0x36,0x2e,0x36,0x39,0x39,0x32,0x2c,0x45,0x2c,0x30,0x2e,0x30,0x30,0x2c,0x2c,0x30,0x31,0x30,0x39,0x31,0x34,0x2c,0x2c,0x2c,0x41,0x2a,0x37,0x38,0x0d,0x0a,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x04,0x04}))));
+
+ }
+
+}