diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2013-11-03 11:36:58 +1300 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2013-11-03 11:36:58 +1300 |
commit | 24b6fb1778d4d5c8835974fca92c00558323e0e2 (patch) | |
tree | 0a3a0e004058c8b0235ecb9c697bb2e9947461c5 /test/org/traccar/protocol | |
parent | f5627add0043dbb511d3d3ebe3cd507e16ab56e3 (diff) | |
download | traccar-server-24b6fb1778d4d5c8835974fca92c00558323e0e2.tar.gz traccar-server-24b6fb1778d4d5c8835974fca92c00558323e0e2.tar.bz2 traccar-server-24b6fb1778d4d5c8835974fca92c00558323e0e2.zip |
Implement Sanav protocol (fix #421)
Diffstat (limited to 'test/org/traccar/protocol')
-rw-r--r-- | test/org/traccar/protocol/SanavProtocolDecoderTest.java | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/test/org/traccar/protocol/SanavProtocolDecoderTest.java b/test/org/traccar/protocol/SanavProtocolDecoderTest.java new file mode 100644 index 000000000..83895245b --- /dev/null +++ b/test/org/traccar/protocol/SanavProtocolDecoderTest.java @@ -0,0 +1,34 @@ +package org.traccar.protocol; + +import static org.junit.Assert.assertNotNull; +import org.junit.Test; + +public class SanavProtocolDecoderTest { + + @Test + public void testDecode() throws Exception { + + SanavProtocolDecoder decoder = new SanavProtocolDecoder(null); + decoder.setDataManager(new TestDataManager()); + + assertNotNull(decoder.decode(null, null, + "imei=352024028982787&rmc=$GPRMC,103048.000,A,4735.0399,N,01905.2895,E,0.00,0.00,171013,,*05,AUTO-4095mv")); + + assertNotNull(decoder.decode(null, null, + "imei:352024028980000rmc:$GPRMC,093604.354,A,4735.0862,N,01905.2146,E,0.00,0.00,171013,,*09,AUTO-4103mv")); + + assertNotNull(decoder.decode(null, null, + "imei:352024027800000rmc:$GPRMC,000025.000,A,4735.0349,N,01905.2899,E,0.00,202.97,171013,,*03,3950mV,AUTO")); + + assertNotNull(decoder.decode(null, null, + "imei:352024020976845rmc:$GPRMC,000201.000,A,4655.7043,N,01941.3796,E,0.54,159.14,171013,,,A*65,AUTO")); + + assertNotNull(decoder.decode(null, null, + "imei=352024028982787&rmc=$GPRMC,103048.000,A,4735.0399,N,01905.2895,E,0.00,0.00,171013,,")); + + assertNotNull(decoder.decode(null, null, + "65,AUTOimei=352024028982787&rmc=$GPRMC,103048.000,A,4735.0399,N,01905.2895,E,0.00,0.00,171013,,")); + + } + +} |