diff options
Diffstat (limited to 'test/org/traccar/protocol/SuntechProtocolDecoderTest.java')
-rw-r--r-- | test/org/traccar/protocol/SuntechProtocolDecoderTest.java | 14 |
1 files changed, 14 insertions, 0 deletions
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 { @@ -26,6 +27,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 { SuntechProtocolDecoder decoder = new SuntechProtocolDecoder(null); |