aboutsummaryrefslogtreecommitdiff
path: root/test/org/traccar/protocol/CguardProtocolDecoderTest.java
diff options
context:
space:
mode:
authorduke2906 <philipp.prangenberg@gmail.com>2016-09-26 15:09:20 +0200
committerGitHub <noreply@github.com>2016-09-26 15:09:20 +0200
commit960bf899414d89221e92138fdb98777c3f4f73ec (patch)
tree87f5fd96185aa5f2fff0f84e2e2fa8be379ee837 /test/org/traccar/protocol/CguardProtocolDecoderTest.java
parent0d3c05a24992eeeba02032e474d3a9bbb3239f10 (diff)
parentaaec58aec04256845dc37afd713b488071b1406b (diff)
downloadtrackermap-server-960bf899414d89221e92138fdb98777c3f4f73ec.tar.gz
trackermap-server-960bf899414d89221e92138fdb98777c3f4f73ec.tar.bz2
trackermap-server-960bf899414d89221e92138fdb98777c3f4f73ec.zip
Merge pull request #1 from tananaev/master
Update Changes, including version 3.7
Diffstat (limited to 'test/org/traccar/protocol/CguardProtocolDecoderTest.java')
-rw-r--r--test/org/traccar/protocol/CguardProtocolDecoderTest.java54
1 files changed, 54 insertions, 0 deletions
diff --git a/test/org/traccar/protocol/CguardProtocolDecoderTest.java b/test/org/traccar/protocol/CguardProtocolDecoderTest.java
new file mode 100644
index 000000000..49d037f8f
--- /dev/null
+++ b/test/org/traccar/protocol/CguardProtocolDecoderTest.java
@@ -0,0 +1,54 @@
+package org.traccar.protocol;
+
+import org.junit.Test;
+import org.traccar.ProtocolTest;
+
+public class CguardProtocolDecoderTest extends ProtocolTest {
+
+ @Test
+ public void testDecode() throws Exception {
+
+ CguardProtocolDecoder decoder = new CguardProtocolDecoder(new CguardProtocol());
+
+ verifyNothing(decoder, text(
+ "IDRO:354868050655283"));
+
+ verifyPosition(decoder, text(
+ "NV:160711 044023:54.342907:48.582590:0:NAN:0:110.1"));
+
+ verifyPosition(decoder, text(
+ "NV:160711 044023:54.342907:-148.582590:0:NAN:0:110.1"));
+
+ verifyNothing(decoder, text(
+ "BC:160711 044023:CSQ1:48:NSQ1:7:NSQ2:1:BAT1:98:PWR1:11.7:CLG1:NAN"));
+
+ verifyNothing(decoder, text(
+ "BC:160711 044524:CSQ1:61:NSQ1:18:BAT1:98:PWR1:11.7:CLG1:NAN"));
+
+ verifyNothing(decoder, text(
+ "VERSION:3.3"));
+
+ verifyPosition(decoder, text(
+ "NV:160420 101902:55.799425:37.674033:0.94:NAN:213.59:156.6"));
+
+ verifyNothing(decoder, text(
+ "BC:160628 081024:CSQ1:32:NSQ1:10:BAT1:100"));
+
+ verifyNothing(decoder, text(
+ "BC:160628 081033:NSQ2:0"));
+
+ verifyPosition(decoder, text(
+ "NV:160630 151537:55.799913:37.674267:0.7:NAN:10.21:174.9"));
+
+ verifyNothing(decoder, text(
+ "BC:160630 153316:BAT1:76"));
+
+ verifyNothing(decoder, text(
+ "BC:160630 153543:NSQ2:0"));
+
+ verifyNothing(decoder, text(
+ "PING"));
+
+ }
+
+}