aboutsummaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2019-08-03 16:48:41 -0700
committerGitHub <noreply@github.com>2019-08-03 16:48:41 -0700
commit1417443c6023f71a16d7b17549e2601c8cd05c2d (patch)
treeb5746cd2fa59a345e5c5d35016e25ce5b74956ac /src/test
parent25be41a6605c3aadeb1a2140da9f7dccb9d573ea (diff)
parent23a03b0bac006fdcc85a82f8323e55cba228451e (diff)
downloadtrackermap-server-1417443c6023f71a16d7b17549e2601c8cd05c2d.tar.gz
trackermap-server-1417443c6023f71a16d7b17549e2601c8cd05c2d.tar.bz2
trackermap-server-1417443c6023f71a16d7b17549e2601c8cd05c2d.zip
Merge pull request #4371 from jesserockz/protocol/leafspy
Add leafspy app protocol and decoder
Diffstat (limited to 'src/test')
-rw-r--r--src/test/java/org/traccar/protocol/LeafSpyProtocolDecoderTest.java21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/test/java/org/traccar/protocol/LeafSpyProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/LeafSpyProtocolDecoderTest.java
new file mode 100644
index 000000000..7fe405ea8
--- /dev/null
+++ b/src/test/java/org/traccar/protocol/LeafSpyProtocolDecoderTest.java
@@ -0,0 +1,21 @@
+package org.traccar.protocol;
+
+import org.junit.Test;
+import org.traccar.ProtocolTest;
+
+public class LeafSpyProtocolDecoderTest extends ProtocolTest {
+
+ @Test
+ public void testDecode() throws Exception {
+
+ LeafSpyProtocolDecoder decoder = new LeafSpyProtocolDecoder(null);
+
+ verifyNull(decoder, request(
+ "/?Lat=60.0&Long=30.0"));
+
+ verifyPosition(decoder, request(
+ "/?user=driver&pass=123456&DevBat=80&Gids=200&Lat=60.0&Long=30.0&Elv=5&Seq=50&Trip=1&Odo=10000&SOC=99.99&AHr=55.00&BatTemp=15.2&Amb=12.0&Wpr=12&PlugState=0&ChrgMode=0&ChrgPwr=0&VIN=ZE0-000000&PwrSw=1&Tunits=C&RPM=1000"));
+
+ }
+
+}