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/Gt02ProtocolDecoderTest.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/Gt02ProtocolDecoderTest.java')
-rw-r--r-- | test/org/traccar/protocol/Gt02ProtocolDecoderTest.java | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/test/org/traccar/protocol/Gt02ProtocolDecoderTest.java b/test/org/traccar/protocol/Gt02ProtocolDecoderTest.java index ccd6ba789..11fc4ff97 100644 --- a/test/org/traccar/protocol/Gt02ProtocolDecoderTest.java +++ b/test/org/traccar/protocol/Gt02ProtocolDecoderTest.java @@ -13,15 +13,15 @@ public class Gt02ProtocolDecoderTest { public void testDecode() throws Exception { Gt02ProtocolDecoder decoder = new Gt02ProtocolDecoder(new TestDataManager(), null, null); - - verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertArray( - new int[] {0x68,0x68,0x25,0x00,0x00,0x01,0x23,0x45,0x67,0x89,0x01,0x23,0x45,0x00,0x01,0x10,0x01,0x01,0x01,0x01,0x01,0x01,0x02,0x6B,0x3F,0x3E,0x02,0x6B,0x3F,0x3E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x0D,0x0A})))); - - assertNull(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertArray( - new int[] {0x68,0x68,0x11,0x06,0x03,0x03,0x58,0x89,0x90,0x51,0x01,0x27,0x66,0x00,0x00,0x1a,0x04,0x02,0x29,0x2d,0x0d,0x0a})))); - - verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertArray( - new int[] {0x68,0x68,0x25,0x00,0xa4,0x03,0x58,0x89,0x90,0x51,0x01,0x27,0x66,0x00,0x01,0x10,0x0e,0x09,0x06,0x0a,0x1d,0x1b,0x00,0xad,0xe1,0xc9,0x0b,0x79,0xea,0x30,0x00,0x01,0x1b,0x00,0x00,0x00,0x00,0x00,0x00,0x05,0x0d,0x0a})))); + + verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertHexString( + "68682500000123456789012345000110010101010101026B3F3E026B3F3E000000000000000000010D0A")))); + + assertNull(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertHexString( + "6868110603035889905101276600001a0402292d0d0a")))); + + verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertHexString( + "68682500a403588990510127660001100e09060a1d1b00ade1c90b79ea3000011b000000000000050d0a")))); } |