From ca8264c895b67cb040b63604500254465abc7677 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Mon, 5 Oct 2015 22:43:55 +1300 Subject: Handle H02 empty validity flag --- test/org/traccar/protocol/H02ProtocolDecoderTest.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'test/org/traccar/protocol/H02ProtocolDecoderTest.java') diff --git a/test/org/traccar/protocol/H02ProtocolDecoderTest.java b/test/org/traccar/protocol/H02ProtocolDecoderTest.java index 744a9982d..076bdf65f 100644 --- a/test/org/traccar/protocol/H02ProtocolDecoderTest.java +++ b/test/org/traccar/protocol/H02ProtocolDecoderTest.java @@ -2,10 +2,10 @@ package org.traccar.protocol; import java.nio.charset.Charset; import org.jboss.netty.buffer.ChannelBuffers; -import static org.traccar.helper.DecoderVerifier.verify; import static org.junit.Assert.assertNull; import org.junit.Test; import org.traccar.helper.ChannelBufferTools; +import static org.traccar.helper.DecoderVerifier.verify; public class H02ProtocolDecoderTest extends ProtocolDecoderTest { @@ -13,6 +13,9 @@ public class H02ProtocolDecoderTest extends ProtocolDecoderTest { public void testDecode() throws Exception { H02ProtocolDecoder decoder = new H02ProtocolDecoder(new H02Protocol()); + + verify(decoder.decode(null, null, ChannelBuffers.copiedBuffer( + "*HQ,355488020119695,V1,050418,,2827.61232,N,07703.84822,E,0.00,0,031015,FFFEFBFF#", Charset.defaultCharset()))); verify(decoder.decode(null, null, ChannelBuffers.copiedBuffer( "*HQ,1451316409,V1,030149,A,-23-29.0095,S,-46-51.5852,W,2.4,065,070315,FFFFFFFF#", Charset.defaultCharset()))); -- cgit v1.2.3