aboutsummaryrefslogtreecommitdiff
path: root/test/org/traccar/protocol
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2017-03-05 22:13:14 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2017-03-05 22:13:14 +1300
commitcbb28de69d4da85b3baff9967549d35952164a31 (patch)
tree31e473b4cff25f5fc74a7687abc3ae67235d494f /test/org/traccar/protocol
parent8163115306af5f82a3c7664daf03e375da3f6a3d (diff)
downloadtraccar-server-cbb28de69d4da85b3baff9967549d35952164a31.tar.gz
traccar-server-cbb28de69d4da85b3baff9967549d35952164a31.tar.bz2
traccar-server-cbb28de69d4da85b3baff9967549d35952164a31.zip
Implement StarLink decoder
Diffstat (limited to 'test/org/traccar/protocol')
-rw-r--r--test/org/traccar/protocol/StarLinkProtocolDecoderTest.java27
1 files changed, 27 insertions, 0 deletions
diff --git a/test/org/traccar/protocol/StarLinkProtocolDecoderTest.java b/test/org/traccar/protocol/StarLinkProtocolDecoderTest.java
new file mode 100644
index 000000000..33ee49812
--- /dev/null
+++ b/test/org/traccar/protocol/StarLinkProtocolDecoderTest.java
@@ -0,0 +1,27 @@
+package org.traccar.protocol;
+
+import org.junit.Test;
+import org.traccar.ProtocolTest;
+
+public class StarLinkProtocolDecoderTest extends ProtocolTest {
+
+ @Test
+ public void testDecode() throws Exception {
+
+ StarLinkProtocolDecoder decoder = new StarLinkProtocolDecoder(new StarLinkProtocol());
+
+ verifyNothing(decoder, text(
+ "$SLU005F20,06,22743,170116091944,01,170116091944,+3206.0991,+03452.0605,003.6,008,064675,1,1,0,0,0,0,0,0,10424,2521,14.156,01.163,,1,1,1,4*BE"));
+
+ verifyNothing(decoder, text(
+ "$SLU005F20,06,22718,170116091422,01,170116091422,+3205.1777,+03450.7595,046.8,359,064671,1,1,0,0,0,0,0,0,10424,64072,14.148,01.161,,1,1,1,4*03"));
+
+ verifyNothing(decoder, text(
+ "$SLU005F20,06,22695,170116090730,24,170116090730,+3203.6062,+03449.6945,013.9,181,064666,1,1,0,0,0,0,0,0,10422,30631,14.089,01.163,,1,1*43"));
+
+ verifyPosition(decoder, text(
+ "$SLU0004D2,06,32,071106135931,01,071106135930,+3159.4376,+03445.3298,021.3,087,000554,31071,11704,13.45,3.87*3E"));
+
+ }
+
+}