diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2015-12-13 08:23:26 +1300 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2015-12-13 08:23:26 +1300 |
commit | 55f11c9dda7394d4c8c96bfe5da9497756df6866 (patch) | |
tree | c8d50930db4681d5e1ac3af8e6f01cc0524bc2b0 /test/org/traccar/protocol | |
parent | d23727f18478d816b4928c611847bdff2ef1f15c (diff) | |
download | trackermap-server-55f11c9dda7394d4c8c96bfe5da9497756df6866.tar.gz trackermap-server-55f11c9dda7394d4c8c96bfe5da9497756df6866.tar.bz2 trackermap-server-55f11c9dda7394d4c8c96bfe5da9497756df6866.zip |
Add support for U-pro protocol
Diffstat (limited to 'test/org/traccar/protocol')
-rw-r--r-- | test/org/traccar/protocol/UproProtocolDecoderTest.java | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/test/org/traccar/protocol/UproProtocolDecoderTest.java b/test/org/traccar/protocol/UproProtocolDecoderTest.java new file mode 100644 index 000000000..c58a748a1 --- /dev/null +++ b/test/org/traccar/protocol/UproProtocolDecoderTest.java @@ -0,0 +1,30 @@ +package org.traccar.protocol; + +import org.junit.Test; +import org.traccar.ProtocolTest; + +public class UproProtocolDecoderTest extends ProtocolTest { + + @Test + public void testDecode() throws Exception { + + UproProtocolDecoder decoder = new UproProtocolDecoder(new UproProtocol()); + + verifyPosition(decoder, text( + "*AI200905300036,AH&A0317264913209801844913060000251115&B0500000000&C0;4?72:9&F0000#")); + + verifyPosition(decoder, text( + "*AI2000905300036,AS&A1647304913209801844913060000251115&B0400000000&C0;4?72:9&F0000")); + + verifyPosition(decoder, text( + "*AI2000905300036,AC1&A1648014913209801844913060000251115&B0400000000&C0;4?72:9&F0000")); + + verifyPosition(decoder, text( + "*AI2000905300036,AB1&A1702464913231101844949860000251115&B0500000000&C0;4?72:9&F0000#")); + + verifyPosition(decoder, text( + "*AI2000905300036,AD1&A1703054913231101844949860000251115&B0500000000&C0;4?72:9&F0000")); + + } + +} |