diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2016-10-11 05:24:36 +1300 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2016-10-11 13:25:17 +1300 |
commit | 018a50801033b4c636faae52bcb955fb8d3a0105 (patch) | |
tree | 6a8c08877feab31dfcfe2f981ae1b941901f6cda /test/org/traccar/protocol | |
parent | 066fdfde178c6075a89ed7272c7a32a4bd04ff47 (diff) | |
download | traccar-server-018a50801033b4c636faae52bcb955fb8d3a0105.tar.gz traccar-server-018a50801033b4c636faae52bcb955fb8d3a0105.tar.bz2 traccar-server-018a50801033b4c636faae52bcb955fb8d3a0105.zip |
Implement ExtremTrac protocol
Diffstat (limited to 'test/org/traccar/protocol')
-rw-r--r-- | test/org/traccar/protocol/ExtremTracProtocolDecoderTest.java | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/test/org/traccar/protocol/ExtremTracProtocolDecoderTest.java b/test/org/traccar/protocol/ExtremTracProtocolDecoderTest.java new file mode 100644 index 000000000..82e461fc7 --- /dev/null +++ b/test/org/traccar/protocol/ExtremTracProtocolDecoderTest.java @@ -0,0 +1,30 @@ +package org.traccar.protocol; + +import org.junit.Test; +import org.traccar.ProtocolTest; + +public class ExtremTracProtocolDecoderTest extends ProtocolTest { + + @Test + public void testDecode() throws Exception { + + ExtremTracProtocolDecoder decoder = new ExtremTracProtocolDecoder(new ExtremTracProtocol()); + + verifyPosition(decoder, text( + "$GPRMC,10000000001,092313.299,A,2238.8947,N,11355.2253,E,0.00,311.19,010307,0,,")); + + verifyPosition(decoder, text( + "$GPRMC,00000000000,092244.000,A,0000.0000,S,00000.0000,E,0.00,0.00,101016,0,,8000,0")); + + verifyNothing(decoder, text( + "$GPRMC,092313.299,A,2238.8947,N,11355.2253,E,0.00,311.19,010307,0,,1111,1111")); + + verifyNothing(decoder, text( + "$GPRMC,092313.299,A,2238.8947,N,11355.2253,E,0.00,311.19,010307,0,,")); + + verifyNothing(decoder, text( + "$GPRMC,100936.000,A,0000.0000,S,00000.0000,E,0.00,0.00,101016,0,,8000,0")); + + } + +} |