diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2017-12-08 04:58:58 +1300 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2017-12-08 04:58:58 +1300 |
commit | d3e39051984592f181b04256e38c2396d0cda78d (patch) | |
tree | f248ac9f82bac1ad03876cbcbc10baf4d2c37f09 /test/org | |
parent | f839ca4c24d80dcd78b5ad1d65f10cdf534d94d8 (diff) | |
download | traccar-server-d3e39051984592f181b04256e38c2396d0cda78d.tar.gz traccar-server-d3e39051984592f181b04256e38c2396d0cda78d.tar.bz2 traccar-server-d3e39051984592f181b04256e38c2396d0cda78d.zip |
Fix Totem AT09 frames decoding
Diffstat (limited to 'test/org')
-rw-r--r-- | test/org/traccar/protocol/TotemFrameDecoderTest.java | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/test/org/traccar/protocol/TotemFrameDecoderTest.java b/test/org/traccar/protocol/TotemFrameDecoderTest.java index 4fd2f86fb..2fbb8ec14 100644 --- a/test/org/traccar/protocol/TotemFrameDecoderTest.java +++ b/test/org/traccar/protocol/TotemFrameDecoderTest.java @@ -11,15 +11,19 @@ public class TotemFrameDecoderTest extends ProtocolTest { TotemFrameDecoder decoder = new TotemFrameDecoder(); - Assert.assertEquals( + verifyFrame( + binary("24243030363545363836313137323033353932363639357c3137303931323135333235372c2d37392e3337333835332c34332e3736353631392c302c302c7c3441"), + decoder.decode(null, null, binary("24243030363545363836313137323033353932363639357c3137303931323135333235372c2d37392e3337333835332c34332e3736353631392c302c302c7c3441"))); + + verifyFrame( binary("24243031303841413836343234343032363036333433377c3141303030303030313430313031303130313031343131313030303032374241304535373030333130303030303030302e3030303030303030303030302e303030304e30303030302e3030303045303438313536"), decoder.decode(null, null, binary("24243031303841413836343234343032363036333433377c3141303030303030313430313031303130313031343131313030303032374241304535373030333130303030303030302e3030303030303030303030302e303030304e30303030302e3030303045303438313536"))); - Assert.assertEquals( + verifyFrame( binary("242442393335363839353033373537383531387c4141244750524d432c3036313730382e3030302c412c333734302e323033332c4e2c30323132382e383132312c452c33382e38352c3237322e33362c3132313131332c2c2c412a35327c30322e337c30312e337c30312e397c3030303030303030303030307c32303133313131323036313730387c31343034313430327c30303030303030307c30303245323137317c303030307c302e323137327c383930327c34463945"), decoder.decode(null, null, binary("242442393335363839353033373537383531387c4141244750524d432c3036313730382e3030302c412c333734302e323033332c4e2c30323132382e383132312c452c33382e38352c3237322e33362c3132313131332c2c2c412a35327c30322e337c30312e337c30312e397c3030303030303030303030307c32303133313131323036313730387c31343034313430327c30303030303030307c30303245323137317c303030307c302e323137327c383930327c344639450d0a"))); - Assert.assertEquals( + verifyFrame( binary("242442393335363839353033373537383531387c4141244750524d432c3036313730382e3030302c412c333734302e323033332c4e2c30323132382e383132312c452c33382e38352c3237322e33362c3132313131332c2c2c412a35327c30322e337c30312e337c30312e397c3030303030303030303030307c32303133313131323036313730387c31343034313430327c30303030303030307c30303245323137317c303030307c302e323137327c383930327c34463945"), decoder.decode(null, null, binary("0d0a242442393335363839353033373537383531387c4141244750524d432c3036313730382e3030302c412c333734302e323033332c4e2c30323132382e383132312c452c33382e38352c3237322e33362c3132313131332c2c2c412a35327c30322e337c30312e337c30312e397c3030303030303030303030307c32303133313131323036313730387c31343034313430327c30303030303030307c30303245323137317c303030307c302e323137327c383930327c344639450d0a"))); |