aboutsummaryrefslogtreecommitdiff
path: root/test/org/traccar/protocol/CellocatorProtocolDecoderTest.java
diff options
context:
space:
mode:
Diffstat (limited to 'test/org/traccar/protocol/CellocatorProtocolDecoderTest.java')
-rw-r--r--test/org/traccar/protocol/CellocatorProtocolDecoderTest.java12
1 files changed, 6 insertions, 6 deletions
diff --git a/test/org/traccar/protocol/CellocatorProtocolDecoderTest.java b/test/org/traccar/protocol/CellocatorProtocolDecoderTest.java
index 3064afe02..3825430e3 100644
--- a/test/org/traccar/protocol/CellocatorProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/CellocatorProtocolDecoderTest.java
@@ -14,14 +14,14 @@ public class CellocatorProtocolDecoderTest {
CellocatorProtocolDecoder decoder = new CellocatorProtocolDecoder(new TestDataManager(), null, null);
- int[] buf1 = {0x4D,0x43,0x47,0x50,0x00,0x06,0x00,0x00,0x00,0x08,0x1A,0x02,0x02,0x12,0x04,0x00,0x00,0x00,0x21,0x00,0x62,0x30,0x00,0x00,0x00,0x6B,0x00,0xE1,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xE5,0xA1,0x00,0x04,0x02,0x06,0x61,0x4E,0xA3,0x03,0x18,0x1A,0x57,0x03,0x4E,0x12,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x15,0x25,0x07,0x14,0x03,0xD6,0x07,0x49};
- verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ByteOrder.LITTLE_ENDIAN, ChannelBufferTools.convertArray(buf1))));
+ verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ByteOrder.LITTLE_ENDIAN, ChannelBufferTools.convertHexString(
+ "4D4347500006000000081A02021204000000210062300000006B00E100000000000000000000E5A100040206614EA303181A57034E1200000000000000001525071403D60749"))));
- int[] buf2 = {0x4d,0x43,0x47,0x50,0x00,0x01,0x01,0x00,0x00,0x08,0x01,0x1f,0x04,0x18,0x04,0x00,0x00,0x00,0x20,0x01,0x00,0x00,0x00,0x00,0x00,0x5e,0x75,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x54,0x85,0x00,0x04,0x02,0x04,0xda,0x4d,0xa3,0x03,0x67,0x19,0x57,0x03,0xe8,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x14,0x15,0x10,0x07,0xdd,0x07,0xf7};
- verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ByteOrder.LITTLE_ENDIAN, ChannelBufferTools.convertArray(buf2))));
+ verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ByteOrder.LITTLE_ENDIAN, ChannelBufferTools.convertHexString(
+ "4d434750000101000008011f041804000000200100000000005e750000000000000000000000548500040204da4da30367195703e80300000000000000002014151007dd07f7"))));
- int[] buf3 = {0x4d,0x43,0x47,0x50,0x00,0x5e,0x93,0x01,0x00,0x08,0x01,0x02,0x04,0x18,0x04,0x00,0x00,0x00,0x20,0x0f,0x20,0x00,0x00,0x00,0x00,0x5e,0x75,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x5a,0xf4,0x00,0x04,0x02,0x04,0xda,0x4d,0xa3,0x03,0x67,0x19,0x57,0x03,0xe8,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x1a,0x11,0x1e,0x08,0xdd,0x07,0x60};
- verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ByteOrder.LITTLE_ENDIAN, ChannelBufferTools.convertArray(buf3))));
+ verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ByteOrder.LITTLE_ENDIAN, ChannelBufferTools.convertHexString(
+ "4d434750005e930100080102041804000000200f20000000005e7500000000000000000000005af400040204da4da30367195703e8030000000000000000021a111e08dd0760"))));
}