From f64840b9e85d4869c92e9f20a2f5043522ad4008 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Thu, 20 Oct 2016 16:32:24 +1300 Subject: Use heuristics for H02 message length --- test/org/traccar/protocol/H02FrameDecoderTest.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'test/org/traccar/protocol') 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"), -- cgit v1.2.3