aboutsummaryrefslogtreecommitdiff
path: root/test/org/traccar/protocol/AtrackProtocolDecoderTest.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2015-01-07 17:27:39 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2015-01-07 17:27:39 +1300
commit2232f5387b7d2126a86f725231454b687f3913d0 (patch)
tree7ce2ccb8074ae71f7433dfea837ac6e3e467877b /test/org/traccar/protocol/AtrackProtocolDecoderTest.java
parent68e178c43d8619b8b13aa78828c75e788d4d2621 (diff)
downloadtrackermap-server-2232f5387b7d2126a86f725231454b687f3913d0.tar.gz
trackermap-server-2232f5387b7d2126a86f725231454b687f3913d0.tar.bz2
trackermap-server-2232f5387b7d2126a86f725231454b687f3913d0.zip
Update binary test cases
Diffstat (limited to 'test/org/traccar/protocol/AtrackProtocolDecoderTest.java')
-rw-r--r--test/org/traccar/protocol/AtrackProtocolDecoderTest.java20
1 files changed, 10 insertions, 10 deletions
diff --git a/test/org/traccar/protocol/AtrackProtocolDecoderTest.java b/test/org/traccar/protocol/AtrackProtocolDecoderTest.java
index 6c6d10771..c06845df7 100644
--- a/test/org/traccar/protocol/AtrackProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/AtrackProtocolDecoderTest.java
@@ -14,21 +14,21 @@ public class AtrackProtocolDecoderTest {
AtrackProtocolDecoder decoder = new AtrackProtocolDecoder(new TestDataManager(), null, null);
- assertNull(decoder.decode(null, null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertArray(
- new int[] {0xfe,0x02,0x00,0x01,0x41,0x04,0xd8,0xf1,0x96,0x82,0x00,0x01}))));
+ assertNull(decoder.decode(null, null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertHexString(
+ "fe0200014104d8f196820001"))));
- verify(decoder.decode(null, null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertArray(
- new int[] {0x40,0x50,0x99,0x3f,0x00,0x5c,0x00,0x02,0x00,0x01,0x41,0x04,0xd8,0xf1,0x96,0x82,0x52,0x56,0x66,0xc2,0x52,0x56,0x8c,0x3c,0x52,0x56,0x8c,0x63,0xff,0xc8,0x33,0x84,0x02,0x69,0x88,0x85,0x00,0x00,0x02,0x00,0x00,0x09,0xcf,0x03,0xde,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0xd0,0x07,0xd0,0x00,0x52,0x56,0x66,0xc2,0x52,0x56,0x8c,0x5a,0x52,0x56,0x8c,0x63,0xff,0xc8,0x33,0x84,0x02,0x69,0x88,0x85,0x00,0x00,0x02,0x00,0x00,0x09,0xcf,0x03,0xde,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0xd0,0x07,0xd0,0x00}))));
+ verify(decoder.decode(null, null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertHexString(
+ "4050993f005c000200014104d8f19682525666c252568c3c52568c63ffc8338402698885000002000009cf03de0100000000000007d007d000525666c252568c5a52568c63ffc8338402698885000002000009cf03de0100000000000007d007d000"))));
- verify(decoder.decode(null, null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertArray(
- new int[] {0x40,0x50,0x1e,0x58,0x00,0x33,0x01,0xe0,0x00,0x01,0x41,0x04,0xd8,0xf1,0x96,0x82,0x52,0x5e,0xcd,0x5d,0x52,0x5e,0xe3,0x44,0x52,0x5e,0xe3,0x5e,0xff,0xc8,0x88,0x15,0x02,0x6a,0xb4,0xd7,0x00,0x00,0x02,0x00,0x00,0x10,0x44,0x03,0xde,0x01,0x00,0x0b,0x00,0x00,0x00,0x00,0x07,0xd0,0x07,0xd0,0x00}))));
+ verify(decoder.decode(null, null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertHexString(
+ "40501e58003301e000014104d8f19682525ecd5d525ee344525ee35effc88815026ab4d70000020000104403de01000b0000000007d007d000"))));
// 7-byte date
- //verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertArray(
- // new int[] {0x02,0x03,0xb4,0x94,0x00,0x3c,0x00,0xeb,0x00,0x01,0x41,0x04,0xd8,0xdd,0x3a,0x3e,0x07,0xde,0x01,0x1b,0x0b,0x1f,0x03,0x07,0xde,0x01,0x1b,0x0b,0x1f,0x03,0x07,0xde,0x01,0x1b,0x0b,0x1f,0x03,0x00,0x30,0x7f,0x28,0x03,0x05,0x74,0xd3,0x00,0x00,0x02,0x00,0x00,0x00,0x06,0x00,0x16,0x01,0x00,0x02,0x00,0x00,0x00,0x00,0x07,0xd0,0x07,0xd0,0x00}))));
+ //verify(decoder.decode(null, null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertHexString(
+ // "0203b494003c00eb00014104d8dd3a3e07de011b0b1f0307de011b0b1f0307de011b0b1f0300307f28030574d30000020000000600160100020000000007d007d000"))));
- //verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertArray(
- // new int[] {0x40,0x50,0xd2,0xc5,0x00,0xda,0x05,0x52,0x00,0x01,0x41,0x04,0xd8,0xf1,0x96,0x82,0x53,0x07,0x55,0x51,0x53,0x07,0x55,0x50,0x53,0x07,0x55,0x81,0xff,0xbb,0xa6,0x6a,0x02,0x31,0x29,0x5c,0x00,0x19,0x02,0x00,0x00,0x00,0xda,0x00,0x0a,0x01,0x00,0x83,0x00,0x00,0x00,0x00,0x07,0xd0,0x07,0xd0,0x00,0x00,0x00,0x00,0x00,0x12,0x00,0x08,0x0e,0x09,0x00,0x85,0x53,0x07,0x55,0x60,0x53,0x07,0x55,0x5f,0x53,0x07,0x55,0x82,0xff,0xbb,0xb0,0x41,0x02,0x31,0x3b,0x4b,0x00,0x18,0x02,0x00,0x00,0x00,0xe0,0x00,0x0c,0x01,0x00,0x85,0x00,0x00,0x00,0x00,0x07,0xd0,0x07,0xd0,0x00,0x00,0x00,0x00,0x00,0x12,0x00,0x08,0x0d,0x00,0x00,0x86,0x53,0x07,0x55,0x6f,0x53,0x07,0x55,0x6e,0x53,0x07,0x55,0x82,0xff,0xbb,0xbb,0xea,0x02,0x31,0x4b,0x49,0x00,0x24,0x02,0x00,0x00,0x00,0xe5,0x00,0x0a,0x01,0x00,0x7b,0x00,0x00,0x00,0x00,0x07,0xd0,0x07,0xd0,0x00,0x00,0x00,0x00,0x00,0x12,0x00,0x08,0x0d,0x02,0x00,0x85,0x53,0x07,0x55,0x7e,0x53,0x07,0x55,0x7d,0x53,0x07,0x55,0x82,0xff,0xbb,0xc9,0x87,0x02,0x31,0x59,0x82,0x00,0x25,0x02,0x00,0x00,0x00,0xea,0x00,0x09,0x01,0x00,0x7a,0x00,0x00,0x00,0x00,0x07,0xd0,0x07,0xd0,0x00,0x00,0x00,0x00,0x00,0x13,0x00,0x18,0x0d,0x08,0x00,0x7b}))));
+ //verify(decoder.decode(null, null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertHexString(
+ // "4050d2c500da055200014104d8f19682530755515307555053075581ffbba66a0231295c001902000000da000a0100830000000007d007d000000000001200080e090085530755605307555f53075582ffbbb04102313b4b001802000000e0000c0100850000000007d007d000000000001200080d0000865307556f5307556e53075582ffbbbbea02314b49002402000000e5000a01007b0000000007d007d000000000001200080d0200855307557e5307557d53075582ffbbc98702315982002502000000ea000901007a0000000007d007d000000000001300180d08007b"))));
}