diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2014-06-01 20:37:44 +1200 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2014-06-01 20:37:44 +1200 |
commit | 8f62b5da5664ef4294387763d328df92784b50e4 (patch) | |
tree | 27ad8ffc056feb00ccf682824a455d3e724655a6 /test/org | |
parent | 688b34433c842b2f4ee546c9b8b19e867bfb4352 (diff) | |
download | trackermap-server-8f62b5da5664ef4294387763d328df92784b50e4.tar.gz trackermap-server-8f62b5da5664ef4294387763d328df92784b50e4.tar.bz2 trackermap-server-8f62b5da5664ef4294387763d328df92784b50e4.zip |
Implement Box protocol
Diffstat (limited to 'test/org')
-rw-r--r-- | test/org/traccar/protocol/BoxProtocolDecoderTest.java | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/test/org/traccar/protocol/BoxProtocolDecoderTest.java b/test/org/traccar/protocol/BoxProtocolDecoderTest.java new file mode 100644 index 000000000..897b5071c --- /dev/null +++ b/test/org/traccar/protocol/BoxProtocolDecoderTest.java @@ -0,0 +1,36 @@ +package org.traccar.protocol; + +import static org.junit.Assert.assertNull; +import org.traccar.helper.TestDataManager; +import static org.traccar.helper.DecoderVerifier.verify; +import org.junit.Test; + +public class BoxProtocolDecoderTest { + + @Test + public void testDecode() throws Exception { + + BoxProtocolDecoder decoder = new BoxProtocolDecoder(null); + decoder.setDataManager(new TestDataManager()); + + assertNull(decoder.decode(null, null, + "H,BT,358281002435893,081028142432,F5813D19,6D6E6DC2")); + + assertNull(decoder.decode(null, null, + "H,BT,N878123,080415081234,D63E6DD9,6D6E6DC2,8944100300825505377")); + + verify(decoder.decode(null, null, + "L,081028142429,G,52.51084,-1.70849,0,170,0,1,0")); + + verify(decoder.decode(null, null, + "L,081028142432,G,52.51081,-1.70849,0,203,0,16,0")); + + assertNull(decoder.decode(null, null, + "L,080528112501,AI1,145.56")); + + assertNull(decoder.decode(null, null, + "E,1")); + + } + +} |