aboutsummaryrefslogtreecommitdiff
path: root/test/org/traccar/protocol/EelinkProtocolDecoderTest.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2015-01-07 17:27:39 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2015-01-07 17:27:39 +1300
commit2232f5387b7d2126a86f725231454b687f3913d0 (patch)
tree7ce2ccb8074ae71f7433dfea837ac6e3e467877b /test/org/traccar/protocol/EelinkProtocolDecoderTest.java
parent68e178c43d8619b8b13aa78828c75e788d4d2621 (diff)
downloadtrackermap-server-2232f5387b7d2126a86f725231454b687f3913d0.tar.gz
trackermap-server-2232f5387b7d2126a86f725231454b687f3913d0.tar.bz2
trackermap-server-2232f5387b7d2126a86f725231454b687f3913d0.zip
Update binary test cases
Diffstat (limited to 'test/org/traccar/protocol/EelinkProtocolDecoderTest.java')
-rw-r--r--test/org/traccar/protocol/EelinkProtocolDecoderTest.java24
1 files changed, 12 insertions, 12 deletions
diff --git a/test/org/traccar/protocol/EelinkProtocolDecoderTest.java b/test/org/traccar/protocol/EelinkProtocolDecoderTest.java
index 60d48fead..58f8d71ad 100644
--- a/test/org/traccar/protocol/EelinkProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/EelinkProtocolDecoderTest.java
@@ -14,18 +14,18 @@ public class EelinkProtocolDecoderTest {
EelinkProtocolDecoder decoder = new EelinkProtocolDecoder(new TestDataManager(), null, null);
- assertNull(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertArray(
- new int[] {0x67,0x67,0x01,0x00,0x0b,0x00,0x1b,0x03,0x54,0x18,0x80,0x46,0x61,0x83,0x49,0x01}))));
-
- assertNull(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertArray(
- new int[] {0x67,0x67,0x03,0x00,0x04,0x00,0x1A,0x00,0x01}))));
-
- assertNull(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertArray(
- new int[] {0x67,0x67,0x07,0x00,0x88,0x00,0x10,0x50,0xE2,0x28,0x14,0x00,0xFF,0xFF,0xFF,0xFF,0x02,0x33,0x44,0x55,0x66,0x03,0x33,0x44,0x55,0x66,0x04,0x33,0x44,0x55,0x66,0x05,0xAA,0x00,0x00,0x00,0x07,0x33,0x44,0x55,0x66,0x0A,0x33,0x44,0x55,0x66,0x0B,0x33,0x44,0x55,0x66,0x0C,0x4E,0x20,0x00,0x00,0x0D,0xAA,0x00,0x00,0x00,0x0E,0x33,0x44,0x55,0x66,0x0F,0x33,0x44,0x55,0x66,0x10,0xAA,0xAA,0x00,0x00,0x11,0x33,0x44,0x55,0x66,0x1C,0x33,0x44,0x55,0x66,0x1F,0x33,0x44,0x55,0x66,0x21,0x33,0x44,0x55,0x66,0x42,0x33,0x44,0x55,0x66,0x46,0x33,0x44,0x55,0x66,0x4D,0x33,0x44,0x55,0x66,0x5C,0x33,0x44,0x55,0x66,0x5E,0x33,0x44,0x55,0x66,0x88,0x00,0x00,0x00,0x00,0x89,0x00,0x00,0x00,0x00,0x8A,0x00,0x00,0x00,0x00,0x8B,0x00,0x00,0x00,0x00}))));
-
- verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertArray(
- new int[] {0x67,0x67,0x02,0x00,0x1b,0x03,0xc5,0x53,0x80,0x86,0xdf,0x01,0x90,0xc1,0x79,0x0b,0x34,0x82,0xdf,0x0f,0x01,0x57,0x02,0x08,0x00,0x01,0x3b,0xeb,0x00,0x34,0x24,0x01}))));
-
+ assertNull(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertHexString(
+ "676701000b001b035418804661834901"))));
+
+ assertNull(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertHexString(
+ "6767030004001A0001"))));
+
+ assertNull(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertHexString(
+ "6767070088001050E2281400FFFFFFFF02334455660333445566043344556605AA00000007334455660A334455660B334455660C4E2000000DAA0000000E334455660F3344556610AAAA000011334455661C334455661F334455662133445566423344556646334455664D334455665C334455665E33445566880000000089000000008A000000008B00000000"))));
+
+ verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertHexString(
+ "676702001b03c5538086df0190c1790b3482df0f0157020800013beb00342401"))));
+
}
}