From 65e0cec500c23b6d49ebf0c2950c205076de1177 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Mon, 3 Sep 2018 10:40:13 +1200 Subject: Implement Milesmate protocol --- .../protocol/MilesmateProtocolDecoderTest.java | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 test/org/traccar/protocol/MilesmateProtocolDecoderTest.java (limited to 'test') diff --git a/test/org/traccar/protocol/MilesmateProtocolDecoderTest.java b/test/org/traccar/protocol/MilesmateProtocolDecoderTest.java new file mode 100644 index 000000000..400c3d9bf --- /dev/null +++ b/test/org/traccar/protocol/MilesmateProtocolDecoderTest.java @@ -0,0 +1,22 @@ +package org.traccar.protocol; + +import org.junit.Test; +import org.traccar.ProtocolTest; + +public class MilesmateProtocolDecoderTest extends ProtocolTest { + + @Test + public void testDecode() throws Exception { + + MilesmateProtocolDecoder decoder = new MilesmateProtocolDecoder(new MilesmateProtocol()); + + verifyPosition(decoder, text( + "ApiString={A:861359037496211,B:12.7,C:06.0,D:060218,E:2837.1003N,F:07723.3162E,G:016.80,H:310818,I:G,J:10010100,K:0000000A,L:1234,M:358.33}"), + position("2018-08-31 06:02:18.000", true, 28.61834, 77.38860)); + + verifyPosition(decoder, text( + "ApiString={A:862631032208018,B:12.1,C:24.4,D:055852,E:2838.5310N,F:07717.8126E,G:000.0,H:200117,I:G,J:10100100,K:1000000A,L:1234,M:324.45}")); + + } + +} -- cgit v1.2.3