From fc0a26137fbd00339fcbf28b10b2afae6242d094 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Thu, 21 Jan 2016 22:19:20 +1300 Subject: Fix Ulbotech frame and protocol decoders --- test/org/traccar/protocol/UlbotechFrameDecoderTest.java | 4 ++++ test/org/traccar/protocol/UlbotechProtocolDecoderTest.java | 3 +++ 2 files changed, 7 insertions(+) (limited to 'test/org/traccar/protocol') diff --git a/test/org/traccar/protocol/UlbotechFrameDecoderTest.java b/test/org/traccar/protocol/UlbotechFrameDecoderTest.java index baf151659..3a21fd209 100644 --- a/test/org/traccar/protocol/UlbotechFrameDecoderTest.java +++ b/test/org/traccar/protocol/UlbotechFrameDecoderTest.java @@ -11,6 +11,10 @@ public class UlbotechFrameDecoderTest extends ProtocolTest { UlbotechFrameDecoder decoder = new UlbotechFrameDecoder(); + Assert.assertEquals( + binary("2a545330312c33353430343330353133383934363023"), + decoder.decode(null, null, binary("2a545330312c33353430343330353133383934363023"))); + Assert.assertEquals( binary("f8010108679650230646339de69054010e015ee17506bde2c60000000000ac0304024000000404000009f705060390181422170711310583410c0000310d00312f834131018608040003130a100101136cf8"), decoder.decode(null, null, binary("f8010108679650230646339de69054010e015ee17506bde2c60000000000ac0304024000000404000009f70005060390181422170711310583410c0000310d00312f834131018608040003130a100101136cf8"))); diff --git a/test/org/traccar/protocol/UlbotechProtocolDecoderTest.java b/test/org/traccar/protocol/UlbotechProtocolDecoderTest.java index 1fb515315..e87e95efe 100644 --- a/test/org/traccar/protocol/UlbotechProtocolDecoderTest.java +++ b/test/org/traccar/protocol/UlbotechProtocolDecoderTest.java @@ -10,6 +10,9 @@ public class UlbotechProtocolDecoderTest extends ProtocolTest { UlbotechProtocolDecoder decoder = new UlbotechProtocolDecoder(new UlbotechProtocol()); + verifyNothing(decoder, binary( + "2a545330312c33353430343330353133383934363023")); + verifyPosition(decoder, binary( "f8010108679650230646339de69054010e015ee17506bde2c60000000000ac0304024000000404000009f705060390181422170711310583410c0000310d00312f834131018608040003130a100101136cf8")); -- cgit v1.2.3