aboutsummaryrefslogtreecommitdiff
path: root/test/org/traccar/protocol/EsealProtocolDecoderTest.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2018-06-12 13:49:59 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2018-06-12 13:49:59 +1200
commit69a4af1c2b419fd7cc6356bcc2bf760969a73f95 (patch)
tree4192ef221be88b024d96422e274836f4c6b33922 /test/org/traccar/protocol/EsealProtocolDecoderTest.java
parent1dc1e06cfd4b7b23775984a254723b2d06b4f1dd (diff)
parent86ad45c63c9a9e9bee59a8cc621416e1396f9c89 (diff)
downloadtrackermap-server-69a4af1c2b419fd7cc6356bcc2bf760969a73f95.tar.gz
trackermap-server-69a4af1c2b419fd7cc6356bcc2bf760969a73f95.tar.bz2
trackermap-server-69a4af1c2b419fd7cc6356bcc2bf760969a73f95.zip
Merge branch 'master' into netty4
# Conflicts: # src/org/traccar/protocol/AquilaProtocolDecoder.java # src/org/traccar/protocol/L100FrameDecoder.java
Diffstat (limited to 'test/org/traccar/protocol/EsealProtocolDecoderTest.java')
-rw-r--r--test/org/traccar/protocol/EsealProtocolDecoderTest.java33
1 files changed, 33 insertions, 0 deletions
diff --git a/test/org/traccar/protocol/EsealProtocolDecoderTest.java b/test/org/traccar/protocol/EsealProtocolDecoderTest.java
new file mode 100644
index 000000000..c14652dd1
--- /dev/null
+++ b/test/org/traccar/protocol/EsealProtocolDecoderTest.java
@@ -0,0 +1,33 @@
+package org.traccar.protocol;
+
+import org.junit.Test;
+import org.traccar.ProtocolTest;
+
+public class EsealProtocolDecoderTest extends ProtocolTest {
+
+ @Test
+ public void testDecode() throws Exception {
+
+ EsealProtocolDecoder decoder = new EsealProtocolDecoder(new EsealProtocol());
+
+ verifyPosition(decoder, text(
+ "##S,eSeal,1000821,256,3.0.6,Normal,34,2017-08-31,08:14:40,15,A,25.708828N 100.372870W,10,0,Close,0.71,0:0:3:0,3.8,-73,E##"));
+
+ verifyPosition(decoder, text(
+ "##S,eSeal,1000821,256,3.0.6,Startup,1,2017-08-31,02:01:19,3,V,0.000000N 0.000000E,0,0,Close,3.25,0:0:5:0,3.8,-93,E##"));
+
+ verifyNull(decoder, text(
+ "##S,eSeal,1000821,256,3.0.6,Startup OK,1,180,30,30,16,1,E##"));
+
+ verifyNull(decoder, text(
+ "##S,eSeal,1000821,256,3.0.6,Startup OK,1,180,30,30,16,1,E##"));
+
+ verifyPosition(decoder, text(
+ "##S,eSeal,1000898,256,3.0.6,Normal,6,2017-09-06,23:48:39,3,V,0.000000N 0.000000E,0,0,Close,1.0,0:0:3:0,4.0,-81,E##"));
+
+ verifyNull(decoder, text(
+ "##S,eSeal,1000898,256,3.0.6,RC-NFC DEL ACK,,E##"));
+
+ }
+
+}