diff options
author | Gavriel Fleischer <flocsy@gmail.com> | 2019-11-11 00:20:13 +0200 |
---|---|---|
committer | Gavriel Fleischer <flocsy@gmail.com> | 2019-11-11 00:20:13 +0200 |
commit | 8a696af4d92821ccf741c21dcbe118861008743a (patch) | |
tree | 74cd5697a87603c4b17ca84206cea9fc34d91f9f /src/test/java/org/traccar/protocol/OutsafeProtocolDecoderTest.java | |
parent | 47a1af1554b0216eae8248227407486c0eba8ef3 (diff) | |
parent | 81a7195b2efe148d47e3cf0cead0de415529bbab (diff) | |
download | trackermap-server-8a696af4d92821ccf741c21dcbe118861008743a.tar.gz trackermap-server-8a696af4d92821ccf741c21dcbe118861008743a.tar.bz2 trackermap-server-8a696af4d92821ccf741c21dcbe118861008743a.zip |
Merge branch 'master' into set-language
# Conflicts:
# src/main/java/org/traccar/StringProtocolEncoder.java
# src/main/java/org/traccar/protocol/WatchProtocolEncoder.java
Diffstat (limited to 'src/test/java/org/traccar/protocol/OutsafeProtocolDecoderTest.java')
-rw-r--r-- | src/test/java/org/traccar/protocol/OutsafeProtocolDecoderTest.java | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/test/java/org/traccar/protocol/OutsafeProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/OutsafeProtocolDecoderTest.java new file mode 100644 index 000000000..82bc7dec7 --- /dev/null +++ b/src/test/java/org/traccar/protocol/OutsafeProtocolDecoderTest.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 OutsafeProtocolDecoderTest extends ProtocolTest { + + @Test + public void testDecode() throws Exception { + + OutsafeProtocolDecoder decoder = new OutsafeProtocolDecoder(null); + + verifyPosition(decoder, request(HttpMethod.POST, "/", + buffer("{\"device\":\"1e09d88a-fe8e-4dee-90b9-6297088ff3de\",\"owner\":\"\",\"data\":{\"cmd\":\"GEO\",\"ms1\":82,\"ms2\":80,\"ms3\":5266,\"ms4\":-68,\"observation\":\"$NMEA 323455\",\"content\":null},\"time\":null,\"origin\":\"TCP\",\"latitude\":19.334734,\"longitude\":-99.307236,\"altitude\":2000,\"heading\":0,\"rssi\":123}"))); + + } + +} |