diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2016-11-15 03:50:30 +1300 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2016-11-15 11:51:13 +1300 |
commit | 3507d5f7aa0670c0970b7e65c91a31fdada41ea2 (patch) | |
tree | 6a1a5d13ddec0edada7172db473779f1b240d68d /test/org/traccar | |
parent | 133a527625b9341138e2b52d566c824c36fb940f (diff) | |
download | trackermap-server-3507d5f7aa0670c0970b7e65c91a31fdada41ea2.tar.gz trackermap-server-3507d5f7aa0670c0970b7e65c91a31fdada41ea2.tar.bz2 trackermap-server-3507d5f7aa0670c0970b7e65c91a31fdada41ea2.zip |
Add JT600 unit test cases
Diffstat (limited to 'test/org/traccar')
-rw-r--r-- | test/org/traccar/protocol/Jt600FrameDecoderTest.java | 8 | ||||
-rw-r--r-- | test/org/traccar/protocol/Jt600ProtocolDecoderTest.java | 3 |
2 files changed, 11 insertions, 0 deletions
diff --git a/test/org/traccar/protocol/Jt600FrameDecoderTest.java b/test/org/traccar/protocol/Jt600FrameDecoderTest.java index 43f7461d0..afa53ba13 100644 --- a/test/org/traccar/protocol/Jt600FrameDecoderTest.java +++ b/test/org/traccar/protocol/Jt600FrameDecoderTest.java @@ -12,6 +12,10 @@ public class Jt600FrameDecoderTest extends ProtocolTest { Jt600FrameDecoder decoder = new Jt600FrameDecoder(); Assert.assertEquals( + binary("2475604055531611002311111600311326144436028210791d016c0000001f070000000020c03c4f6d07d80ccf"), + decoder.decode(null, null, binary("2475604055531611002311111600311326144436028210791d016c0000001f070000000020c03c4f6d07d80ccf"))); + + Assert.assertEquals( binary("2475605035891613002328091601152806086750106533350c00000000000a000000000000e1ff4f97007f1607"), decoder.decode(null, null, binary("2475605035891613002328091601152806086750106533350c00000000000a000000000000e1ff4f97007f1607"))); @@ -23,6 +27,10 @@ public class Jt600FrameDecoderTest extends ProtocolTest { binary("24312082002911001B171012053405243809970255335555000406140003EE2B91044D1F02"), decoder.decode(null, null, binary("24312082002911001B171012053405243809970255335555000406140003EE2B91044D1F02"))); + Assert.assertEquals( + binary("28373536303430353535332c404a5429"), + decoder.decode(null, null, binary("28373536303430353535332c404a5429"))); + } } diff --git a/test/org/traccar/protocol/Jt600ProtocolDecoderTest.java b/test/org/traccar/protocol/Jt600ProtocolDecoderTest.java index 3fc74081f..59dc311aa 100644 --- a/test/org/traccar/protocol/Jt600ProtocolDecoderTest.java +++ b/test/org/traccar/protocol/Jt600ProtocolDecoderTest.java @@ -12,6 +12,9 @@ public class Jt600ProtocolDecoderTest extends ProtocolTest { Jt600ProtocolDecoder decoder = new Jt600ProtocolDecoder(new Jt600Protocol()); verifyPosition(decoder, binary( + "2475604055531611002311111600311326144436028210791d016c0000001f070000000020c03c4f6d07d80ccf")); + + verifyPosition(decoder, binary( "2475201509260111002313101503464722331560113555309F00000000002D0500CB206800F064109326381A03")); verifyPosition(decoder, binary( |