From a9007f67bc0c579fe7c9bfb856aee9cab89f1ca4 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Sat, 12 Jan 2019 09:42:32 -0800 Subject: Test Suntech hours decoding --- test/org/traccar/protocol/SuntechProtocolDecoderTest.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'test/org') diff --git a/test/org/traccar/protocol/SuntechProtocolDecoderTest.java b/test/org/traccar/protocol/SuntechProtocolDecoderTest.java index e0065133c..23410c8c1 100644 --- a/test/org/traccar/protocol/SuntechProtocolDecoderTest.java +++ b/test/org/traccar/protocol/SuntechProtocolDecoderTest.java @@ -2,6 +2,7 @@ package org.traccar.protocol; import org.junit.Test; import org.traccar.ProtocolTest; +import org.traccar.model.Position; public class SuntechProtocolDecoderTest extends ProtocolTest { @@ -25,6 +26,19 @@ public class SuntechProtocolDecoderTest extends ProtocolTest { } + @Test + public void testDecodeHours() throws Exception { + + SuntechProtocolDecoder decoder = new SuntechProtocolDecoder(null); + + decoder.setHbm(true); + + verifyAttribute(decoder, text( + "ST300ALT;007239104;40;313;20190112;01:07:16;c99139;+04.703287;-074.148897;000.000;189.72;21;1;425512;12.61;100000;33;003188;4.1;1"), + Position.KEY_HOURS, 3188 * 60000L); + + } + @Test public void testDecode() throws Exception { -- cgit v1.2.3