aboutsummaryrefslogtreecommitdiff
path: root/test/org/traccar/protocol/H02ProtocolDecoderTest.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2015-01-27 12:23:35 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2015-01-27 12:23:35 +1300
commit75aa9f8ba896fe88f7842126081b367872a26c46 (patch)
tree26390c9a42fb2324b525083dab9c28df4e368298 /test/org/traccar/protocol/H02ProtocolDecoderTest.java
parent0a7bfdfbcec8dbb587882c63919456a3855930b4 (diff)
downloadtrackermap-server-75aa9f8ba896fe88f7842126081b367872a26c46.tar.gz
trackermap-server-75aa9f8ba896fe88f7842126081b367872a26c46.tar.bz2
trackermap-server-75aa9f8ba896fe88f7842126081b367872a26c46.zip
Update binary test cases
Diffstat (limited to 'test/org/traccar/protocol/H02ProtocolDecoderTest.java')
-rw-r--r--test/org/traccar/protocol/H02ProtocolDecoderTest.java30
1 files changed, 15 insertions, 15 deletions
diff --git a/test/org/traccar/protocol/H02ProtocolDecoderTest.java b/test/org/traccar/protocol/H02ProtocolDecoderTest.java
index 09b55d816..eed626380 100644
--- a/test/org/traccar/protocol/H02ProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/H02ProtocolDecoderTest.java
@@ -78,21 +78,21 @@ public class H02ProtocolDecoderTest {
assertNull(decoder.decode(null, null, ChannelBuffers.copiedBuffer(
"*HQ,8401016597,BASE,152609,0,0,0,0,211014,FFFFFFFF#", Charset.defaultCharset())));
- verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertArray(
- new int[]{0x24,0x27,0x05,0x17,0x11,0x09,0x21,0x33,0x39,0x14,0x06,0x13,0x50,0x02,0x58,0x49,0x00,0x01,0x43,0x37,0x82,0x2e,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0x00,0x00}))));
-
- verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertArray(
- new int[]{0x24,0x27,0x05,0x17,0x11,0x09,0x21,0x34,0x09,0x14,0x06,0x13,0x50,0x02,0x58,0x49,0x00,0x01,0x43,0x37,0x82,0x2e,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0x00,0x00}))));
-
- verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertArray(
- new int[]{0x24,0x10,0x30,0x73,0x10,0x01,0x05,0x03,0x16,0x22,0x09,0x02,0x22,0x12,0x87,0x45,0x00,0x11,0x34,0x66,0x57,0x4C,0x01,0x40,0x28,0xff,0xff,0xfb,0xff,0xff,0x00,0x00}))));
-
- verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertArray(
- new int[]{0x24,0x41,0x09,0x00,0x13,0x45,0x08,0x31,0x25,0x04,0x01,0x14,0x50,0x47,0x88,0x80,0x00,0x00,0x85,0x54,0x65,0x0e,0x00,0x00,0x00,0xff,0xff,0xf9,0xff,0xff,0x00,0x10,0x06,0x00,0x00,0x00,0x00,0x01,0x06,0x02,0x02,0x99,0x10,0x9c,0x01}))));
-
- verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertArray(
- new int[]{0x24,0x27,0x05,0x17,0x03,0x08,0x20,0x32,0x14,0x18,0x04,0x14,0x23,0x30,0x78,0x79,0x00,0x04,0x63,0x21,0x37,0x92,0x00,0x00,0x56,0xff,0xff,0xf9,0xff,0xff,0x00,0x00}))));
-
+ verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertHexString(
+ "2427051711092133391406135002584900014337822e000000ffffffffff0000"))));
+
+ verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertHexString(
+ "2427051711092134091406135002584900014337822e000000ffffffffff0000"))));
+
+ verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertHexString(
+ "2410307310010503162209022212874500113466574C014028fffffbffff0000"))));
+
+ verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertHexString(
+ "2441090013450831250401145047888000008554650e000000fffff9ffff001006000000000106020299109c01"))));
+
+ verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertHexString(
+ "24270517030820321418041423307879000463213792000056fffff9ffff0000"))));
+
}
}