From 59416923dcb3a756eaf532cc4259f2f6625c0762 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Sun, 31 Mar 2019 22:35:39 -0700 Subject: Convert project to gradle --- .../traccar/protocol/EsealProtocolDecoderTest.java | 33 ++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 src/test/java/org/traccar/protocol/EsealProtocolDecoderTest.java (limited to 'src/test/java/org/traccar/protocol/EsealProtocolDecoderTest.java') diff --git a/src/test/java/org/traccar/protocol/EsealProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/EsealProtocolDecoderTest.java new file mode 100644 index 000000000..b615e5062 --- /dev/null +++ b/src/test/java/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(null); + + 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##")); + + } + +} -- cgit v1.2.3