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/Gt06ProtocolDecoderTest.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/Gt06ProtocolDecoderTest.java')
-rw-r--r-- | test/org/traccar/protocol/Gt06ProtocolDecoderTest.java | 64 |
1 files changed, 32 insertions, 32 deletions
diff --git a/test/org/traccar/protocol/Gt06ProtocolDecoderTest.java b/test/org/traccar/protocol/Gt06ProtocolDecoderTest.java index 1536644a0..c0af74538 100644 --- a/test/org/traccar/protocol/Gt06ProtocolDecoderTest.java +++ b/test/org/traccar/protocol/Gt06ProtocolDecoderTest.java @@ -14,48 +14,48 @@ public class Gt06ProtocolDecoderTest { Gt06ProtocolDecoder decoder = new Gt06ProtocolDecoder(new TestDataManager(), null, null); - assertNull(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertArray( - new int[] {0x78,0x78,0x11,0x01,0x01,0x23,0x45,0x67,0x89,0x01,0x23,0x45,0x10,0x0B,0x32,0x01,0x00,0x01,0x71,0x93,0x0D,0x0A})))); + assertNull(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertHexString( + "787811010123456789012345100B3201000171930D0A")))); - verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertArray( - new int[] {0x78,0x78,0x1F,0x12,0x0B,0x08,0x1D,0x11,0x2E,0x10,0xCC,0x02,0x7A,0xC7,0xEB,0x0C,0x46,0x58,0x49,0x00,0x14,0x8F,0x01,0xCC,0x00,0x28,0x7D,0x00,0x1F,0xB8,0x00,0x03,0x80,0x81,0x0D,0x0A})))); + verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertHexString( + "78781F120B081D112E10CC027AC7EB0C46584900148F01CC00287D001FB8000380810D0A")))); - assertNull(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertArray( - new int[] {0x78,0x78,0x0D,0x01,0x08,0x64,0x71,0x70,0x03,0x28,0x35,0x81,0x00,0x09,0x3F,0x04,0x0D,0x0A})))); + assertNull(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertHexString( + "78780D01086471700328358100093F040D0A")))); - assertNull(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertArray( - new int[] {0x78,0x78,0x0D,0x01,0x01,0x23,0x45,0x67,0x89,0x01,0x23,0x45,0x00,0x01,0x8C,0xDD,0x0D,0x0A})))); + assertNull(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertHexString( + "78780D01012345678901234500018CDD0D0A")))); - assertNull(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertArray( - new int[] {0x78,0x78,0x0d,0x01,0x03,0x53,0x41,0x90,0x36,0x06,0x60,0x61,0x00,0x03,0xc3,0xdf,0x0d,0x0a})))); + assertNull(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertHexString( + "78780d0103534190360660610003c3df0d0a")))); - verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertArray( - new int[] {0x78,0x78,0x19,0x10,0x0B,0x03,0x1A,0x0B,0x1B,0x31,0xCC,0x02,0x7A,0xC7,0xFD,0x0C,0x46,0x57,0xBF,0x01,0x15,0x21,0x00,0x01,0x00,0x1C,0xC6,0x07,0x0D,0x0A})))); + verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertHexString( + "787819100B031A0B1B31CC027AC7FD0C4657BF0115210001001CC6070D0A")))); - verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertArray( - new int[] {0x78,0x78,0x21,0x12,0x0C,0x01,0x0C,0x0F,0x15,0x1F,0xCF,0x02,0x7A,0xC8,0x84,0x0C,0x46,0x57,0xEC,0x00,0x14,0x00,0x01,0xCC,0x00,0x28,0x7D,0x00,0x1F,0x72,0x00,0x01,0x00,0x0F,0x53,0xA0,0x0D,0x0A})))); + verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertHexString( + "787821120C010C0F151FCF027AC8840C4657EC00140001CC00287D001F720001000F53A00D0A")))); - verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertArray( - new int[] {0x78,0x78,0x25,0x16,0x0B,0x05,0x1B,0x09,0x35,0x23,0xCF,0x02,0x7A,0xC8,0x36,0x0C,0x46,0x57,0xB3,0x00,0x14,0x00,0x09,0x01,0xCC,0x00,0x26,0x6A,0x00,0x1E,0x17,0x40,0x05,0x04,0x00,0x02,0x00,0x08,0xD7,0xB1,0x0D,0x0A})))); + verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertHexString( + "787825160B051B093523CF027AC8360C4657B30014000901CC00266A001E1740050400020008D7B10D0A")))); - assertNull(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertArray( - new int[] {0x78,0x78,0x11,0x01,0x08,0x64,0x71,0x70,0x03,0x66,0x44,0x67,0x10,0x0f,0x19,0x0a,0x00,0x02,0xc6,0xd2,0x0d,0x0a})))); - - verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertArray( - new int[] {0x78,0x78,0x19,0x10,0x0e,0x01,0x09,0x03,0x23,0x0e,0xc8,0x03,0xae,0x32,0xa6,0x06,0x53,0xcd,0xed,0x00,0x18,0x00,0x00,0x02,0x00,0x72,0xfe,0xb7,0x0d,0x0a})))); + assertNull(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertHexString( + "787811010864717003664467100f190a0002c6d20d0a")))); - verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertArray( - new int[] {0x78,0x78,0x47,0x1e,0x0e,0x03,0x11,0x0b,0x05,0x11,0xc5,0x01,0xc6,0x64,0xfd,0x07,0x4d,0xb7,0x3f,0x02,0x18,0xa6,0x02,0xe0,0x03,0x43,0x3a,0x00,0x2f,0xed,0x40,0x43,0x3a,0x00,0x56,0xe1,0x4e,0x43,0x3a,0x00,0x56,0x10,0x4e,0x43,0x3a,0x00,0x56,0xfd,0x53,0x43,0x3a,0x00,0x2e,0xed,0x55,0x43,0x3a,0x00,0x7e,0x4b,0x57,0x43,0x3a,0x00,0x2e,0xe2,0x5a,0xff,0x00,0x02,0x01,0x20,0xf6,0x72,0x0d,0x0a})))); - - assertNull(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertArray( - new int[] {0x79,0x79,0x00,0x5b,0xfd,0x03,0x58,0x89,0x90,0x50,0x92,0x77,0x25,0x00,0x4c,0x00,0x20,0xbf,0x98,0x43,0x58,0xdf,0x60,0x3b,0x2e,0xa3,0xa3,0x39,0xe5,0x43,0x35,0x01,0x3a,0x5b,0x56,0x45,0x52,0x53,0x49,0x4f,0x4e,0x5d,0x47,0x54,0x30,0x36,0x44,0x5f,0x32,0x30,0x5f,0x36,0x30,0x44,0x4d,0x32,0x5f,0x42,0x32,0x35,0x45,0x5f,0x56,0x31,0x35,0x5f,0x57,0x4d,0x5b,0x42,0x55,0x49,0x4c,0x44,0x5d,0x32,0x30,0x31,0x33,0x2f,0x31,0x32,0x2f,0x32,0x38,0x20,0x31,0x35,0x3a,0x32,0x34,0x00,0x2a,0x3b,0x24,0x0d,0x0a,0x79,0x79,0x00,0x5b,0xfd,0x03,0x58,0x89,0x90,0x50,0x92,0x77,0x25,0x00,0x4c,0x00,0x20,0xbf,0x98,0x43,0x58,0xdf,0x60,0x3b,0x2e,0xa3,0xa3,0x39,0xe5,0x43,0x35,0x01,0x3a,0x5b,0x56,0x45,0x52,0x53,0x49,0x4f,0x4e,0x5d,0x47,0x54,0x30,0x36,0x44,0x5f,0x32,0x30,0x5f,0x36,0x30,0x44,0x4d,0x32,0x5f,0x42,0x32,0x35,0x45,0x5f,0x56,0x31,0x35,0x5f,0x57,0x4d,0x5b,0x42,0x55,0x49,0x4c,0x44,0x5d,0x32,0x30,0x31,0x33,0x2f,0x31,0x32,0x2f,0x32,0x38,0x20,0x31,0x35,0x3a,0x32,0x34,0x00,0x2d,0x4f,0x9b,0x0d,0x0a,0x79,0x79,0x00,0x5b,0xfd,0x03,0x58,0x89,0x90,0x50,0x92,0x77,0x25,0x00,0x4c,0x00,0x20,0xbf,0x98,0x43,0x58,0xdf,0x60,0x3b,0x2e,0xa3,0xa3,0x39,0xe5,0x43,0x35,0x01,0x3a,0x5b,0x56,0x45,0x52,0x53,0x49,0x4f,0x4e,0x5d,0x47,0x54,0x30,0x36,0x44,0x5f,0x32,0x30,0x5f,0x36,0x30,0x44,0x4d,0x32,0x5f,0x42,0x32,0x35,0x45,0x5f,0x56,0x31,0x35,0x5f,0x57,0x4d,0x5b,0x42,0x55,0x49,0x4c,0x44,0x5d,0x32,0x30,0x31,0x33,0x2f,0x31,0x32,0x2f,0x32,0x38,0x20,0x31,0x35,0x3a,0x32,0x34,0x00,0x30,0x84,0xff,0x0d,0x0a})))); - - assertNull(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertArray( - new int[] {0x78,0x78,0x8b,0x81,0x83,0x00,0x00,0x00,0x00,0x53,0x45,0x45,0x46,0x4e,0x26,0x26,0x00,0x4f,0x04,0x22,0x00,0x45,0x04,0x26,0x26,0x26,0x2b,0x37,0x39,0x30,0x35,0x34,0x30,0x31,0x35,0x35,0x34,0x36,0x26,0x26,0x26,0x26,0x26,0x26,0x04,0x10,0x04,0x1b,0x04,0x15,0x04,0x1a,0x04,0x21,0x04,0x15,0x04,0x19,0x26,0x26,0x2b,0x37,0x39,0x30,0x36,0x34,0x33,0x33,0x30,0x31,0x31,0x35,0x26,0x26,0x04,0x10,0x04,0x3d,0x04,0x4f,0x26,0x26,0x2b,0x37,0x39,0x36,0x30,0x34,0x37,0x38,0x34,0x30,0x36,0x34,0x26,0x26,0x04,0x12,0x04,0x3e,0x04,0x32,0x04,0x30,0x26,0x26,0x2b,0x37,0x39,0x32,0x38,0x38,0x34,0x37,0x37,0x38,0x38,0x31,0x26,0x26,0x26,0x26,0x26,0x26,0x26,0x26,0x26,0x26,0x26,0x26,0x26,0x26,0x26,0x26,0x23,0x23,0x00,0x02,0x00,0x22,0x15,0x5d,0x0d,0x0a})))); + verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertHexString( + "787819100e010903230ec803ae32a60653cded00180000020072feb70d0a")))); + + verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertHexString( + "7878471e0e03110b0511c501c664fd074db73f0218a602e003433a002fed40433a0056e14e433a0056104e433a0056fd53433a002eed55433a007e4b57433a002ee25aff00020120f6720d0a")))); + + assertNull(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertHexString( + "7979005bfd0358899050927725004c0020bf984358df603b2ea3a339e54335013a5b56455253494f4e5d47543036445f32305f3630444d325f423235455f5631355f574d5b4255494c445d323031332f31322f32382031353a3234002a3b240d0a7979005bfd0358899050927725004c0020bf984358df603b2ea3a339e54335013a5b56455253494f4e5d47543036445f32305f3630444d325f423235455f5631355f574d5b4255494c445d323031332f31322f32382031353a3234002d4f9b0d0a7979005bfd0358899050927725004c0020bf984358df603b2ea3a339e54335013a5b56455253494f4e5d47543036445f32305f3630444d325f423235455f5631355f574d5b4255494c445d323031332f31322f32382031353a3234003084ff0d0a")))); + + assertNull(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertHexString( + "78788b818300000000534545464e2626004f04220045042626262b37393035343031353534362626262626260410041b0415041a04210415041926262b373930363433333031313526260410043d044f26262b373936303437383430363426260412043e0432043026262b373932383834373738383126262626262626262626262626262626232300020022155d0d0a")))); + + verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertHexString( + "787822220e0914160f07c9021a362805090a7800d8b802d402c30e00a98a0105010213f4bb0d0a")))); - verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertArray( - new int[] {0x78,0x78,0x22,0x22,0x0e,0x09,0x14,0x16,0x0f,0x07,0xc9,0x02,0x1a,0x36,0x28,0x05,0x09,0x0a,0x78,0x00,0xd8,0xb8,0x02,0xd4,0x02,0xc3,0x0e,0x00,0xa9,0x8a,0x01,0x05,0x01,0x02,0x13,0xf4,0xbb,0x0d,0x0a})))); - } } |