diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2015-01-27 12:23:35 +1300 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2015-01-27 12:23:35 +1300 |
commit | 75aa9f8ba896fe88f7842126081b367872a26c46 (patch) | |
tree | 26390c9a42fb2324b525083dab9c28df4e368298 /test/org/traccar/protocol/KhdProtocolDecoderTest.java | |
parent | 0a7bfdfbcec8dbb587882c63919456a3855930b4 (diff) | |
download | trackermap-server-75aa9f8ba896fe88f7842126081b367872a26c46.tar.gz trackermap-server-75aa9f8ba896fe88f7842126081b367872a26c46.tar.bz2 trackermap-server-75aa9f8ba896fe88f7842126081b367872a26c46.zip |
Update binary test cases
Diffstat (limited to 'test/org/traccar/protocol/KhdProtocolDecoderTest.java')
-rw-r--r-- | test/org/traccar/protocol/KhdProtocolDecoderTest.java | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/test/org/traccar/protocol/KhdProtocolDecoderTest.java b/test/org/traccar/protocol/KhdProtocolDecoderTest.java index 7d196df25..9593bf6d1 100644 --- a/test/org/traccar/protocol/KhdProtocolDecoderTest.java +++ b/test/org/traccar/protocol/KhdProtocolDecoderTest.java @@ -14,29 +14,29 @@ public class KhdProtocolDecoderTest { KhdProtocolDecoder decoder = new KhdProtocolDecoder(new TestDataManager(), null, null); - assertNull(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertArray( - new int[] {0x29,0x29,0xb1,0x00,0x06,0x05,0x16,0x29,0x35,0xb8,0x0d})))); - - verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertArray( - new int[] {0x29,0x29,0x80,0x00,0x28,0x05,0x16,0x29,0x35,0x14,0x01,0x08,0x07,0x47,0x27,0x80,0x11,0x29,0x67,0x03,0x65,0x33,0x69,0x00,0x00,0x01,0x03,0xff,0xff,0x00,0x00,0x82,0xfc,0x00,0x00,0x00,0x1e,0x78,0x09,0x1b,0x00,0x00,0x00,0x36,0x0d})))); - - verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertArray( - new int[] {0x29,0x29,0x81,0x00,0x28,0x0A,0x9F,0x95,0x38,0x08,0x12,0x28,0x16,0x01,0x31,0x02,0x23,0x94,0x30,0x11,0x40,0x37,0x25,0x00,0x00,0x03,0x30,0xFF,0x00,0x00,0x00,0x7F,0xFC,0x0F,0x00,0x00,0x1E,0x00,0x00,0x00,0x00,0x00,0x34,0x29,0x0D})))); - - verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertArray( - new int[] {0x29,0x29,0x80,0x00,0x28,0x0A,0x81,0x85,0x0A,0x12,0x03,0x10,0x09,0x57,0x50,0x00,0x52,0x81,0x37,0x00,0x61,0x19,0x08,0x00,0x00,0x02,0x32,0xF8,0x48,0xFF,0xBB,0xFF,0xFF,0x00,0x00,0x00,0x1E,0x00,0x00,0x00,0x00,0x00,0x00,0xED,0x0D})))); - - verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertArray( - new int[] {0x29,0x29,0x8E,0x00,0x28,0x0F,0x80,0x81,0x5A,0x12,0x12,0x18,0x20,0x31,0x16,0x02,0x23,0x18,0x46,0x11,0x40,0x22,0x70,0x00,0x72,0x02,0x62,0xFB,0x00,0x07,0x7C,0x7F,0xBF,0x56,0x00,0x00,0x1E,0x3C,0x32,0x00,0x00,0x00,0x00,0x85,0x0D})))); - - verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertArray( - new int[] {0x29,0x29,0x82,0x00,0x23,0x0A,0xA2,0xCC,0x39,0x12,0x05,0x03,0x05,0x05,0x22,0x02,0x85,0x94,0x79,0x03,0x10,0x95,0x50,0x00,0x80,0x02,0x07,0x84,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x75,0x0D})))); - - verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertArray( - new int[] {0x29,0x29,0x85,0x00,0x08,0x1D,0xD0,0x8C,0x22,0x12,0x03,0x12,0x17,0x40,0x26,0x02,0x65,0x45,0x71,0x03,0x12,0x54,0x17,0x00,0x00,0x00,0x00,0xF8,0x19,0xC8,0x39,0xFF,0xFF,0x1D,0x00,0x00,0x1E,0x00,0x50,0x00,0x00,0x00,0x3A,0xF9,0x0D})))); - - verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertArray( - new int[] {0x29,0x29,0x80,0x00,0x28,0x22,0x83,0x66,0x65,0x14,0x08,0x25,0x14,0x20,0x37,0x04,0x53,0x43,0x77,0x01,0x93,0x87,0x92,0x00,0x00,0x00,0x50,0xff,0xff,0x00,0x00,0x82,0xfc,0x00,0x00,0x04,0xb0,0x78,0x0b,0x17,0x00,0x00,0x00,0x2a,0x0d})))); + assertNull(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertHexString( + "2929b1000605162935b80d")))); + + verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertHexString( + "292980002805162935140108074727801129670365336900000103ffff000082fc0000001e78091b000000360d")))); + + verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertHexString( + "29298100280A9F9538081228160131022394301140372500000330FF0000007FFC0F00001E000000000034290D")))); + + verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertHexString( + "29298000280A81850A120310095750005281370061190800000232F848FFBBFFFF0000001E000000000000ED0D")))); + + verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertHexString( + "29298E00280F80815A121218203116022318461140227000720262FB00077C7FBF5600001E3C3200000000850D")))); + + verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertHexString( + "29298200230AA2CC391205030505220285947903109550008002078400000002000000000000750D")))); + + verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertHexString( + "29298500081DD08C22120312174026026545710312541700000000F819C839FFFF1D00001E00500000003AF90D")))); + + verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertHexString( + "292980002822836665140825142037045343770193879200000050ffff000082fc000004b0780b170000002a0d")))); } |