aboutsummaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2021-01-07 21:11:20 -0800
committerAnton Tananaev <anton.tananaev@gmail.com>2021-01-07 21:11:20 -0800
commit5201306b8b0de6c603186ac83b757b84b84535a6 (patch)
treefbd34bbde57deefdd2825aa5dee4b29d6ea5937b /src/test
parentd21747209c9092e3cd693a872d38b9fac8fb1abc (diff)
downloadtraccar-server-5201306b8b0de6c603186ac83b757b84b84535a6.tar.gz
traccar-server-5201306b8b0de6c603186ac83b757b84b84535a6.tar.bz2
traccar-server-5201306b8b0de6c603186ac83b757b84b84535a6.zip
Implement Ennfu protocol
Diffstat (limited to 'src/test')
-rw-r--r--src/test/java/org/traccar/protocol/EnnfuProtocolDecoderTest.java24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/test/java/org/traccar/protocol/EnnfuProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/EnnfuProtocolDecoderTest.java
new file mode 100644
index 000000000..7d40d956b
--- /dev/null
+++ b/src/test/java/org/traccar/protocol/EnnfuProtocolDecoderTest.java
@@ -0,0 +1,24 @@
+package org.traccar.protocol;
+
+import org.junit.Test;
+import org.traccar.ProtocolTest;
+
+public class EnnfuProtocolDecoderTest extends ProtocolTest {
+
+ @Test
+ public void testDecode() throws Exception {
+
+ EnnfuProtocolDecoder decoder = new EnnfuProtocolDecoder(null);
+
+ verifyPosition(decoder, text(
+ "Ennfu:354679095321652,041504.00,A,3154.86654,N,11849.08737,E,0.053,,080121,20,3.72,21.4,V0.01"));
+
+ verifyPosition(decoder, text(
+ "Ennfu:354679095321652,060951.00,A,3154.86786,N,11849.09042,E,0.058,,060121,17,4.0,86.8,V0.01"));
+
+ verifyNull(decoder, text(
+ "Ennfu:HeartBeat,354679095321652"));
+
+ }
+
+}