diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2019-01-12 09:42:32 -0800 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2019-01-12 09:42:38 -0800 |
commit | a9007f67bc0c579fe7c9bfb856aee9cab89f1ca4 (patch) | |
tree | 879992bba41965f9a2e886fce24de504d9bac062 | |
parent | 9bfa95e5d449c1353015680f2dafeeebab907652 (diff) | |
download | trackermap-server-a9007f67bc0c579fe7c9bfb856aee9cab89f1ca4.tar.gz trackermap-server-a9007f67bc0c579fe7c9bfb856aee9cab89f1ca4.tar.bz2 trackermap-server-a9007f67bc0c579fe7c9bfb856aee9cab89f1ca4.zip |
Test Suntech hours decoding
-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); |