aboutsummaryrefslogtreecommitdiff
path: root/test/org/traccar/protocol/TaipProtocolDecoderTest.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2015-06-29 13:27:58 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2015-06-29 13:27:58 +1200
commitb18d80471dd99381df631a9754421a3e63e21cb4 (patch)
treeb14dda440d1a40496373fb87161bea79d36b111e /test/org/traccar/protocol/TaipProtocolDecoderTest.java
parentb7327c3addc914c729ca2f9b50cd9a82e6d5d7d2 (diff)
downloadtrackermap-server-b18d80471dd99381df631a9754421a3e63e21cb4.tar.gz
trackermap-server-b18d80471dd99381df631a9754421a3e63e21cb4.tar.bz2
trackermap-server-b18d80471dd99381df631a9754421a3e63e21cb4.zip
Combine Syrus and Taip protocols
Diffstat (limited to 'test/org/traccar/protocol/TaipProtocolDecoderTest.java')
-rw-r--r--test/org/traccar/protocol/TaipProtocolDecoderTest.java40
1 files changed, 40 insertions, 0 deletions
diff --git a/test/org/traccar/protocol/TaipProtocolDecoderTest.java b/test/org/traccar/protocol/TaipProtocolDecoderTest.java
new file mode 100644
index 000000000..78ccd4c7f
--- /dev/null
+++ b/test/org/traccar/protocol/TaipProtocolDecoderTest.java
@@ -0,0 +1,40 @@
+package org.traccar.protocol;
+
+import static org.junit.Assert.assertNotNull;
+import static org.traccar.helper.DecoderVerifier.verify;
+import org.junit.Test;
+
+public class TaipProtocolDecoderTest extends ProtocolDecoderTest {
+
+ @Test
+ public void testDecode() throws Exception {
+
+ TaipProtocolDecoder decoder = new TaipProtocolDecoder(new TaipProtocol(), false);
+
+ verify(decoder.decode(null, null,
+ ">RGP230615010248-2682523-065236820000003007F4101;ID=0005;#0002;*2A<"));
+
+ verify(decoder.decode(null, null,
+ ">RGP190805211932-3457215-058493640000000FFBF0300;ID=8251;#2122;*54<"));
+
+ assertNotNull(decoder.decode(null, null,
+ ">RPV00000+3739438-1220384601512612;ID=1234;*7F"));
+
+ verify(decoder.decode(null, null,
+ "\r\n>REV691615354941+3570173+1397742703203212;ID=Test"));
+
+ verify(decoder.decode(null, null,
+ ">REV481599462982+2578391-0802945201228512;ID=Test"));
+
+ verify(decoder.decode(null, null,
+ ">REV131756153215+3359479-0075299001031332;VO=10568798;IO=310;SV=10;BL=4190;CV09=0;AD=0;AL=+47;ID=356612021059680"));
+
+ assertNotNull(decoder.decode(null, null,
+ ">RPV02138+4555512-0735478000000032;ID=1005;*76<"));
+
+ assertNotNull(decoder.decode(null, null,
+ ">RPV19105+4538405-0739518900000012;ID=9999;*7A<\r\n"));
+
+ }
+
+}