diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2017-05-05 13:31:48 +1200 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2017-05-05 13:31:48 +1200 |
commit | 841965ba439654f76dcd7fc63efd70647f23f29f (patch) | |
tree | cd93ed140386487b946e884f702fb3be4d356f39 /test/org | |
parent | 4ce5dd893d3b95fc759fd1d0e0dbf09d0d559936 (diff) | |
download | trackermap-server-841965ba439654f76dcd7fc63efd70647f23f29f.tar.gz trackermap-server-841965ba439654f76dcd7fc63efd70647f23f29f.tar.bz2 trackermap-server-841965ba439654f76dcd7fc63efd70647f23f29f.zip |
Implement PT510 frame decoder workaround
Diffstat (limited to 'test/org')
-rw-r--r-- | test/org/traccar/protocol/Pt502FrameDecoderTest.java | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/test/org/traccar/protocol/Pt502FrameDecoderTest.java b/test/org/traccar/protocol/Pt502FrameDecoderTest.java index 34fdf9bb9..44de2459d 100644 --- a/test/org/traccar/protocol/Pt502FrameDecoderTest.java +++ b/test/org/traccar/protocol/Pt502FrameDecoderTest.java @@ -14,8 +14,16 @@ public class Pt502FrameDecoderTest extends ProtocolTest { Pt502FrameDecoder decoder = new Pt502FrameDecoder(); Assert.assertEquals( + binary("244655533836353332383032363234333836342c3531302d56312e31322c4131312d56332e30"), + decoder.decode(null, null, binary(ByteOrder.LITTLE_ENDIAN, "bffb192d00244655533836353332383032363234333836342c3531302d56312e31322c4131312d56332e300d0d"))); + + Assert.assertEquals( + binary("24504f532c3836353332383032363234333836342c3134343733352e3030302c412c313333322e373038332c4e2c3230342e363833312c452c302e302c3233302e30302c3032303531372c2c2c412f30303030302c31302f312c302f3233342f2f4646392f"), + decoder.decode(null, null, binary(ByteOrder.LITTLE_ENDIAN, "24504f532c3836353332383032363234333836342c3134343733352e3030302c412c313333322e373038332c4e2c3230342e363833312c452c302e302c3233302e30302c3032303531372c2c2c412f30303030302c31302f312c302f3233342f2f4646392f0d0a"))); + + Assert.assertEquals( binary("24504f532c3335333435313030303136342c3038323430352e3030302c412c313235342e383530312c4e2c31303035312e363735322c452c302e30302c3233372e39392c3136303531332c2c2c412f303030302c302f302f35353030302f2f6137312f"), - decoder.decode(null, null, binary("24504f532c3335333435313030303136342c3038323430352e3030302c412c313235342e383530312c4e2c31303035312e363735322c452c302e30302c3233372e39392c3136303531332c2c2c412f303030302c302f302f35353030302f2f6137312f0d0a"))); + decoder.decode(null, null, binary(ByteOrder.LITTLE_ENDIAN, "24504f532c3335333435313030303136342c3038323430352e3030302c412c313235342e383530312c4e2c31303035312e363735322c452c302e30302c3233372e39392c3136303531332c2c2c412f303030302c302f302f35353030302f2f6137312f0d0a"))); Assert.assertEquals( binary("24504f532c3335333435313030303136342c3038323430352e3030302c412c313235342e383530312c4e2c31303035312e363735322c452c302e30302c3233372e39392c3136303531332c2c2c412f303030302c302f302f35353030302f2f6137312f"), |