From 3a0a2ec7c2a3cd418300c90e7e44c0d86499476c Mon Sep 17 00:00:00 2001 From: nyash Date: Sun, 18 Sep 2016 14:42:13 +0200 Subject: Add jpkorjar protocol decoder test --- .../traccar/protocol/JpKorjarProtocolDecoderTest.java | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 test/org/traccar/protocol/JpKorjarProtocolDecoderTest.java (limited to 'test/org/traccar/protocol') diff --git a/test/org/traccar/protocol/JpKorjarProtocolDecoderTest.java b/test/org/traccar/protocol/JpKorjarProtocolDecoderTest.java new file mode 100644 index 000000000..d253af99c --- /dev/null +++ b/test/org/traccar/protocol/JpKorjarProtocolDecoderTest.java @@ -0,0 +1,19 @@ +package org.traccar.protocol; + + +import org.junit.Test; +import org.traccar.ProtocolTest; + +public class JpKorjarProtocolDecoderTest extends ProtocolTest { + + @Test + public void testDecode() throws Exception { + + JpKorjarProtocolDecoder decoder = new JpKorjarProtocolDecoder(new JpKorjarProtocol()); + + verifyPosition(decoder, text( + "KORJAR.PL,329587014519383,160910144240,52.247254N,021.013375E,0.00,1,F:4.18V,1 260 01 794B 3517,")); + + } + +} -- cgit v1.2.3 From a0c125575a4b5d400790e2290d3212799355b498 Mon Sep 17 00:00:00 2001 From: nyash Date: Mon, 19 Sep 2016 12:18:30 +0200 Subject: Add jpkorjar tests showcasing changing attributes --- test/org/traccar/protocol/JpKorjarProtocolDecoderTest.java | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'test/org/traccar/protocol') diff --git a/test/org/traccar/protocol/JpKorjarProtocolDecoderTest.java b/test/org/traccar/protocol/JpKorjarProtocolDecoderTest.java index d253af99c..44cdbe2f2 100644 --- a/test/org/traccar/protocol/JpKorjarProtocolDecoderTest.java +++ b/test/org/traccar/protocol/JpKorjarProtocolDecoderTest.java @@ -14,6 +14,12 @@ public class JpKorjarProtocolDecoderTest extends ProtocolTest { verifyPosition(decoder, text( "KORJAR.PL,329587014519383,160910144240,52.247254N,021.013375E,0.00,1,F:4.18V,1 260 01 794B 3517,")); + verifyPosition(decoder, text( + "KORJAR.PL,329587014519383,160910144240,52.895515N,021.949151E,6.30,212,F:3.94V,0 260 01 794B 3519,")); + + verifyPosition(decoder, text( + "KORJAR.PL,329587014519383,160910144240,52.895596N,021.949343E,12.46,087,L:2.18V,1 260 01 794B 3517,")); + } } -- cgit v1.2.3