From e00aa4273108c75d4bce19503800ec53cad39af3 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Thu, 4 Jan 2018 07:00:59 +1300 Subject: Implement Globalstar SPOT protocol --- .../org/traccar/protocol/SpotProtocolDecoderTest.java | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 test/org/traccar/protocol/SpotProtocolDecoderTest.java (limited to 'test') diff --git a/test/org/traccar/protocol/SpotProtocolDecoderTest.java b/test/org/traccar/protocol/SpotProtocolDecoderTest.java new file mode 100644 index 000000000..3d6feeca0 --- /dev/null +++ b/test/org/traccar/protocol/SpotProtocolDecoderTest.java @@ -0,0 +1,19 @@ +package org.traccar.protocol; + +import org.jboss.netty.handler.codec.http.HttpMethod; +import org.junit.Test; +import org.traccar.ProtocolTest; + +public class SpotProtocolDecoderTest extends ProtocolTest { + + @Test + public void testDecode() throws Exception { + + SpotProtocolDecoder decoder = new SpotProtocolDecoder(new SpotProtocol()); + + verifyPositions(decoder, request(HttpMethod.POST, "/", + buffer("\n\n
\n 1\n LIVE\n
\n \n 891801957\n 0-3112123\n 0-3112123a\n NEWMOVEMENT\n SPOT Trace has detected that the asset has moved.\n 2017-12-27T13:19:38.000Z\n 1514380778\n -1.28781\n -47.93042\n GOOD\n \n
"))); + + } + +} -- cgit v1.2.3