aboutsummaryrefslogtreecommitdiff
path: root/src/test/java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2021-10-11 21:15:58 -0700
committerAnton Tananaev <anton.tananaev@gmail.com>2021-10-11 21:15:58 -0700
commitaeb560b9eb988960e2964c4e329899723dd70891 (patch)
treedbe644d70fb6a3b40c275d587f76f663a739f162 /src/test/java
parent6d737a665b905b8e4394d63962386ce51ef96509 (diff)
downloadtrackermap-server-aeb560b9eb988960e2964c4e329899723dd70891.tar.gz
trackermap-server-aeb560b9eb988960e2964c4e329899723dd70891.tar.bz2
trackermap-server-aeb560b9eb988960e2964c4e329899723dd70891.zip
Support Hoopo platform API
Diffstat (limited to 'src/test/java')
-rw-r--r--src/test/java/org/traccar/protocol/HoopoProtocolDecoderTest.java19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/test/java/org/traccar/protocol/HoopoProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/HoopoProtocolDecoderTest.java
new file mode 100644
index 000000000..37f838dd4
--- /dev/null
+++ b/src/test/java/org/traccar/protocol/HoopoProtocolDecoderTest.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 HoopoProtocolDecoderTest extends ProtocolTest {
+
+ @Test
+ public void testDecode() throws Exception {
+
+ var decoder = new HoopoProtocolDecoder(null);
+
+ verifyPosition(decoder, request(HttpMethod.POST, "/",
+ buffer("{ \"deviceId\": \"BCCD0654\", \"assetName\": \"BCCD0654\", \"assetType\": \"???? ?????? - ??? 8\", \"eventData\": { \"latitude\": 31.97498, \"longitude\": 34.80802, \"locationName\": \"\", \"accuracyLevel\": \"High\", \"eventType\": \"Arrival\", \"batteryLevel\": 100, \"receiveTime\": \"2021-09-20T18:52:32Z\" }, \"eventTime\": \"2021-09-20T08:52:02Z\", \"serverReportTime\": \"0001-01-01T00:00:00Z\" }")));
+
+ }
+
+}