diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2013-05-29 22:11:59 +1200 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2013-05-29 22:11:59 +1200 |
commit | 56d8564104aaa79e166c4fbe5f8147fc01e7b1ba (patch) | |
tree | d083c3e648d26639faf18c75b61c4b01884e9da7 /test/org/traccar | |
parent | 76ab97612a13e6d89b45596372fb311a3dafa826 (diff) | |
download | trackermap-server-56d8564104aaa79e166c4fbe5f8147fc01e7b1ba.tar.gz trackermap-server-56d8564104aaa79e166c4fbe5f8147fc01e7b1ba.tar.bz2 trackermap-server-56d8564104aaa79e166c4fbe5f8147fc01e7b1ba.zip |
Support Map Power protocol (fix #225)
Diffstat (limited to 'test/org/traccar')
-rw-r--r-- | test/org/traccar/protocol/ManPowerProtocolDecoderTest.java | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/test/org/traccar/protocol/ManPowerProtocolDecoderTest.java b/test/org/traccar/protocol/ManPowerProtocolDecoderTest.java new file mode 100644 index 000000000..02db3276b --- /dev/null +++ b/test/org/traccar/protocol/ManPowerProtocolDecoderTest.java @@ -0,0 +1,24 @@ +package org.traccar.protocol; + +import static org.junit.Assert.assertNotNull; +import org.junit.Test; + +public class ManPowerProtocolDecoderTest { + + @Test + public void testDecode() throws Exception { + + ManPowerProtocolDecoder decoder = new ManPowerProtocolDecoder(null); + decoder.setDataManager(new TestDataManager()); + + assertNotNull(decoder.decode(null, null, + "simei:352581250259539,,,tracker,51,24,1.73,130426023608,A,3201.5462,N,03452.2975,E,0.01,28B9,1DED,425,01,1x0x0*0x1*60x+2,en-us,")); + + assertNotNull(decoder.decode(null, null, + "simei:352581250259539,,,weather,99,20,0.00,130426032310,V,3201.5517,N,03452.3064,E,1.24,28B9,25A1,425,01,1x0x0*0x1*60x+2,en-us,")); + + assertNotNull(decoder.decode(null, null, + "simei:352581250259539,,,SMS,54,19,90.41,130426172308,V,3201.5523,N,03452.2705,E,0.14,28B9,01A5,425,01,1x0x0*0x1*60x+2,en-us,")); + } + +} |