aboutsummaryrefslogtreecommitdiff
path: root/src/test/java/org/traccar
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2019-12-07 22:32:42 -0800
committerAnton Tananaev <anton.tananaev@gmail.com>2019-12-07 22:32:42 -0800
commit9a5891a1d2fdca01a04b4f47db375347b504322b (patch)
tree038430f1c9691fe37bae4a95338c0ad63f08618a /src/test/java/org/traccar
parent3e402ffca4649a390d237c6aba8678022b23370a (diff)
downloadtrackermap-server-9a5891a1d2fdca01a04b4f47db375347b504322b.tar.gz
trackermap-server-9a5891a1d2fdca01a04b4f47db375347b504322b.tar.bz2
trackermap-server-9a5891a1d2fdca01a04b4f47db375347b504322b.zip
Implement S168 protocol
Diffstat (limited to 'src/test/java/org/traccar')
-rw-r--r--src/test/java/org/traccar/protocol/S168ProtocolDecoderTest.java21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/test/java/org/traccar/protocol/S168ProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/S168ProtocolDecoderTest.java
new file mode 100644
index 000000000..8a4a42b54
--- /dev/null
+++ b/src/test/java/org/traccar/protocol/S168ProtocolDecoderTest.java
@@ -0,0 +1,21 @@
+package org.traccar.protocol;
+
+import org.junit.Test;
+import org.traccar.ProtocolTest;
+
+public class S168ProtocolDecoderTest extends ProtocolTest {
+
+ @Test
+ public void testDecode() throws Exception {
+
+ S168ProtocolDecoder decoder = new S168ProtocolDecoder(null);
+
+ verifyNull(decoder, text(
+ "S168#358511139046180#00c9#0009#SYNC:0000"));
+
+ verifyPosition(decoder, text(
+ "S168#000000000000008#0f12#0077#LOCA:G;CELL:1,1cc,2,2795,1435,64;GDATA:A,12,160412154800,22.564025,113.242329,5.5,152,900;ALERT:0000;STATUS:89,98;WAY:0"));
+
+ }
+
+}