aboutsummaryrefslogtreecommitdiff
path: root/test/org/traccar/protocol/DwayProtocolDecoderTest.java
diff options
context:
space:
mode:
authorIvan Muratov <binakot@gmail.com>2017-10-26 08:28:34 +0300
committerGitHub <noreply@github.com>2017-10-26 08:28:34 +0300
commit74cea90707321c775c11e9cfb91269f63ab4476f (patch)
treec6f3e9d02c43eb28ac8506e198e137ca57b1f102 /test/org/traccar/protocol/DwayProtocolDecoderTest.java
parentdb02157dbb29539dda4b51a5e8b317293cfc536c (diff)
parentdcc7e0c6ed949604af5e62c671e293f582146bc0 (diff)
downloadtraccar-server-74cea90707321c775c11e9cfb91269f63ab4476f.tar.gz
traccar-server-74cea90707321c775c11e9cfb91269f63ab4476f.tar.bz2
traccar-server-74cea90707321c775c11e9cfb91269f63ab4476f.zip
Merge branch 'master' into master
Diffstat (limited to 'test/org/traccar/protocol/DwayProtocolDecoderTest.java')
-rw-r--r--test/org/traccar/protocol/DwayProtocolDecoderTest.java30
1 files changed, 30 insertions, 0 deletions
diff --git a/test/org/traccar/protocol/DwayProtocolDecoderTest.java b/test/org/traccar/protocol/DwayProtocolDecoderTest.java
new file mode 100644
index 000000000..481382535
--- /dev/null
+++ b/test/org/traccar/protocol/DwayProtocolDecoderTest.java
@@ -0,0 +1,30 @@
+package org.traccar.protocol;
+
+import org.junit.Test;
+import org.traccar.ProtocolTest;
+
+public class DwayProtocolDecoderTest extends ProtocolTest {
+
+ @Test
+ public void testDecode() throws Exception {
+
+ DwayProtocolDecoder decoder = new DwayProtocolDecoder(new DwayProtocol());
+
+ verifyNull(decoder, text(
+ "AA55,36,10024,1,171025,161055,36.0294,-79.7881,201, 2.5,111,1000,0000,00000,3578,0,0,0,D"));
+
+ verifyNull(decoder, text(
+ "AA55,115,318,1,171024,195059,28.0153,-82.4761,3, 1.0,319,1000,0000,00000,4244,0,0,0,D"));
+
+ verifyNull(decoder, text(
+ "AA55,117,318,1,171025,153758,28.0152,-82.4759,19, 0.6,319,1000,0000,10000,4242,0,0,0,D"));
+
+ verifyPosition(decoder, text(
+ "AA55,1,123456,1,140101,101132,22.5500,113.6770,75,70.5,320,1100,0011,1110,3950,33000,24000,12345678"));
+
+ verifyNull(decoder, text(
+ ">H12345678"));
+
+ }
+
+}