aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2016-10-20 16:32:24 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2016-10-20 16:32:24 +1300
commitf64840b9e85d4869c92e9f20a2f5043522ad4008 (patch)
treef2cc0e4f7c893ebbc7313adaa3ea656b1c0ea7c8 /test
parent23e11715cc6f5e94002123293a1108a48044316e (diff)
downloadtrackermap-server-f64840b9e85d4869c92e9f20a2f5043522ad4008.tar.gz
trackermap-server-f64840b9e85d4869c92e9f20a2f5043522ad4008.tar.bz2
trackermap-server-f64840b9e85d4869c92e9f20a2f5043522ad4008.zip
Use heuristics for H02 message length
Diffstat (limited to 'test')
-rw-r--r--test/org/traccar/protocol/H02FrameDecoderTest.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/test/org/traccar/protocol/H02FrameDecoderTest.java b/test/org/traccar/protocol/H02FrameDecoderTest.java
index a8417341a..3e12bb446 100644
--- a/test/org/traccar/protocol/H02FrameDecoderTest.java
+++ b/test/org/traccar/protocol/H02FrameDecoderTest.java
@@ -9,7 +9,11 @@ public class H02FrameDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- H02FrameDecoder decoder = new H02FrameDecoder(32);
+ H02FrameDecoder decoder = new H02FrameDecoder(0);
+
+ Assert.assertEquals(
+ binary("24410600082621532131081504419390060740418306000000fffffbfdff0015060000002c02dc0c000000001f"),
+ decoder.decode(null, null, binary("24410600082621532131081504419390060740418306000000fffffbfdff0015060000002c02dc0c000000001f")));
Assert.assertEquals(
binary("2a48512c3335333538383036303031353536382c56312c3139333530352c412c3830392e303031302c532c333435342e383939372c572c302e30302c302e30302c3239313031332c65666666666266662c3030303264342c3030303030622c3030353338352c3030353261612c323523"),