diff options
Diffstat (limited to 'src/test/java/org/traccar/protocol')
-rw-r--r-- | src/test/java/org/traccar/protocol/MoovboxProtocolDecoderTest.java | 19 |
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>"))); + + } + +} |