diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2021-07-21 21:54:24 -0700 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2021-07-21 21:54:24 -0700 |
commit | b8256eb4140dd0a03b98ae6c3e67fcbc561d0229 (patch) | |
tree | b9e808b9e9aa66aaa240c8e6f46b2e074d6b361f /src/test/java/org/traccar/protocol/LacakProtocolDecoderTest.java | |
parent | b6f241706a3b79b0336bbff059e7b61c8cf58772 (diff) | |
download | trackermap-server-b8256eb4140dd0a03b98ae6c3e67fcbc561d0229.tar.gz trackermap-server-b8256eb4140dd0a03b98ae6c3e67fcbc561d0229.tar.bz2 trackermap-server-b8256eb4140dd0a03b98ae6c3e67fcbc561d0229.zip |
Add Transistor Software geolocation
Diffstat (limited to 'src/test/java/org/traccar/protocol/LacakProtocolDecoderTest.java')
-rw-r--r-- | src/test/java/org/traccar/protocol/LacakProtocolDecoderTest.java | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/test/java/org/traccar/protocol/LacakProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/LacakProtocolDecoderTest.java new file mode 100644 index 000000000..c407d1e64 --- /dev/null +++ b/src/test/java/org/traccar/protocol/LacakProtocolDecoderTest.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 LacakProtocolDecoderTest extends ProtocolTest { + + @Test + public void testDecode() throws Exception { + + var decoder = new LacakProtocolDecoder(null); + + verifyPosition(decoder, request(HttpMethod.POST, "/", + buffer("{\"location\":{\"event\":\"motionchange\",\"is_moving\":false,\"uuid\":\"0e9a2473-a9a7-4c00-997b-fb97d2154e75\",\"timestamp\":\"2021-07-21T08:06:34.444Z\",\"odometer\":0,\"coords\":{\"latitude\":-6.1148096,\"longitude\":106.6837015,\"accuracy\":3.8,\"speed\":18.67,\"speed_accuracy\":0.26,\"heading\":63,\"heading_accuracy\":0.28,\"altitude\":35.7,\"altitude_accuracy\":3.8},\"activity\":{\"type\":\"still\",\"confidence\":100},\"battery\":{\"is_charging\":false,\"level\":0.79},\"extras\":{}},\"device_id\":\"8737767034\"}"))); + + } + +} |