diff options
Diffstat (limited to 'src/test')
-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}"))); + + } + +} |