aboutsummaryrefslogtreecommitdiff
path: root/test/org/traccar
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2019-01-12 09:42:32 -0800
committerAnton Tananaev <anton.tananaev@gmail.com>2019-01-12 09:42:38 -0800
commita9007f67bc0c579fe7c9bfb856aee9cab89f1ca4 (patch)
tree879992bba41965f9a2e886fce24de504d9bac062 /test/org/traccar
parent9bfa95e5d449c1353015680f2dafeeebab907652 (diff)
downloadtrackermap-server-a9007f67bc0c579fe7c9bfb856aee9cab89f1ca4.tar.gz
trackermap-server-a9007f67bc0c579fe7c9bfb856aee9cab89f1ca4.tar.bz2
trackermap-server-a9007f67bc0c579fe7c9bfb856aee9cab89f1ca4.zip
Test Suntech hours decoding
Diffstat (limited to 'test/org/traccar')
-rw-r--r--test/org/traccar/protocol/SuntechProtocolDecoderTest.java14
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);