aboutsummaryrefslogtreecommitdiff
path: root/src/test/java/org
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2020-08-16 17:47:16 -0700
committerAnton Tananaev <anton.tananaev@gmail.com>2020-08-16 17:47:16 -0700
commit9d523680556de75b59c5c7ad52a38df68ac67434 (patch)
treefd56974c548356d19cab69c51c656bb4e0ad8a17 /src/test/java/org
parent0d73e71a2b5a37192ebeddbf2af1115f4074e35c (diff)
downloadtrackermap-server-9d523680556de75b59c5c7ad52a38df68ac67434.tar.gz
trackermap-server-9d523680556de75b59c5c7ad52a38df68ac67434.tar.bz2
trackermap-server-9d523680556de75b59c5c7ad52a38df68ac67434.zip
Implement Icomera Moovbox protocol
Diffstat (limited to 'src/test/java/org')
-rw-r--r--src/test/java/org/traccar/protocol/MoovboxProtocolDecoderTest.java19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/test/java/org/traccar/protocol/MoovboxProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/MoovboxProtocolDecoderTest.java
new file mode 100644
index 000000000..c0090e9f2
--- /dev/null
+++ b/src/test/java/org/traccar/protocol/MoovboxProtocolDecoderTest.java
@@ -0,0 +1,19 @@
+package org.traccar.protocol;
+
+import io.netty.handler.codec.http.HttpMethod;
+import org.junit.Test;
+import org.traccar.ProtocolTest;
+
+public class MoovboxProtocolDecoderTest extends ProtocolTest {
+
+ @Test
+ public void testDecode() throws Exception {
+
+ MoovboxProtocolDecoder decoder = new MoovboxProtocolDecoder(null);
+
+ verifyPositions(decoder, request(HttpMethod.POST, "/",
+ buffer("<gps id=\"911\">\n<coordinates><coordinate>\n<fix>3</fix>\n<time>1597580050</time>\n<latitude>80.726257</latitude>\n<longitude>13.821351</longitude>\n<altitude>9.500000</altitude>\n<climb>0.000000</climb>\n<speed>0.064000</speed>\n<separation>-27.300000</separation>\n<track>0.000000</track>\n<satellites>9</satellites>\n</coordinate></coordinates>\n</gps>")));
+
+ }
+
+}