From 71735f0c9b17ad1c64a4335a196b4c765b4499c1 Mon Sep 17 00:00:00 2001
From: Anton Tananaev <anton.tananaev@gmail.com>
Date: Sun, 2 Feb 2020 16:26:46 -0800
Subject: Rename classes

---
 .../traccar/protocol/Arnavi4FrameDecoderTest.java  | 47 --------------------
 .../protocol/Arnavi4ProtocolDecoderTest.java       | 38 ----------------
 .../protocol/ArnaviBinaryProtocolDecoderTest.java  | 38 ++++++++++++++++
 .../traccar/protocol/ArnaviFrameDecoderTest.java   | 51 ++++++++++++++++++++++
 .../protocol/ArnaviProtocolDecoderTest.java        | 42 ------------------
 .../protocol/ArnaviTextProtocolDecoderTest.java    | 42 ++++++++++++++++++
 6 files changed, 131 insertions(+), 127 deletions(-)
 delete mode 100644 src/test/java/org/traccar/protocol/Arnavi4FrameDecoderTest.java
 delete mode 100644 src/test/java/org/traccar/protocol/Arnavi4ProtocolDecoderTest.java
 create mode 100644 src/test/java/org/traccar/protocol/ArnaviBinaryProtocolDecoderTest.java
 create mode 100644 src/test/java/org/traccar/protocol/ArnaviFrameDecoderTest.java
 delete mode 100644 src/test/java/org/traccar/protocol/ArnaviProtocolDecoderTest.java
 create mode 100644 src/test/java/org/traccar/protocol/ArnaviTextProtocolDecoderTest.java

(limited to 'src/test/java/org/traccar')

diff --git a/src/test/java/org/traccar/protocol/Arnavi4FrameDecoderTest.java b/src/test/java/org/traccar/protocol/Arnavi4FrameDecoderTest.java
deleted file mode 100644
index aa3f85820..000000000
--- a/src/test/java/org/traccar/protocol/Arnavi4FrameDecoderTest.java
+++ /dev/null
@@ -1,47 +0,0 @@
-package org.traccar.protocol;
-
-import org.junit.Test;
-import org.traccar.ProtocolTest;
-
-public class Arnavi4FrameDecoderTest extends ProtocolTest {
-
-    @Test
-    public void testDecodeValidPackets() throws Exception {
-
-        Arnavi4FrameDecoder decoder = new Arnavi4FrameDecoder();
-
-        verifyFrame(
-                binary("ff22f30c45f5c90f0300"),
-                decoder.decode(null, null, binary("ff22f30c45f5c90f0300")));
-
-        verifyFrame(
-                binary("5b01012800a3175f5903513934420447221c42055402781E0900f0c5215b4e0084005c00007c005d0000a300fa37010000295d"),
-                decoder.decode(null, null, binary("5b01012800a3175f5903513934420447221c42055402781E0900f0c5215b4e0084005c00007c005d0000a300fa37010000295d")));
-
-        verifyFrame(
-                binary("5b01012800a3175f5903513934420447221c42055402781E0900f0c5215b4e0084005c00007c005d0000a300fa3701000029012800a3175f5903513934420447221c42055402781E0900f0c5215b4e0084005c00007c005d0000a300fa37010000295d"),
-                decoder.decode(null, null, binary("5b01012800a3175f5903513934420447221c42055402781E0900f0c5215b4e0084005c00007c005d0000a300fa3701000029012800a3175f5903513934420447221c42055402781E0900f0c5215b4e0084005c00007c005d0000a300fa37010000295d")));
-
-        verifyFrame(
-                binary("5b01030700e3f16b50747261636361721b5d"),
-                decoder.decode(null, null, binary("5b01030700e3f16b50747261636361721b5d")));
-
-        verifyFrame(
-                binary("5b01030700e3f16b50747261636361721b030700e3f16b50747261636361721b5d"),
-                decoder.decode(null, null, binary("5b01030700e3f16b50747261636361721b030700e3f16b50747261636361721b5d")));
-
-        verifyFrame(
-                binary("5b01061400e3f16b5003298b5e4204cbd514420500191000080400ff021b5d"),
-                decoder.decode(null, null, binary("5b01061400e3f16b5003298b5e4204cbd514420500191000080400ff021b5d")));
-
-        verifyFrame(
-                binary("5b01061400e3f16b5003298b5e4204cbd514420500191000080400ff021b061400e3f16b5003298b5e4204cbd514420500191000080400ff021b5d"),
-                decoder.decode(null, null, binary("5b01061400e3f16b5003298b5e4204cbd514420500191000080400ff021b061400e3f16b5003298b5e4204cbd514420500191000080400ff021b5d")));
-
-        verifyFrame(
-                binary("5bfd005d"),
-                decoder.decode(null, null, binary("5bfd005d")));
-
-    }
-
-}
diff --git a/src/test/java/org/traccar/protocol/Arnavi4ProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/Arnavi4ProtocolDecoderTest.java
deleted file mode 100644
index 2628188b9..000000000
--- a/src/test/java/org/traccar/protocol/Arnavi4ProtocolDecoderTest.java
+++ /dev/null
@@ -1,38 +0,0 @@
-package org.traccar.protocol;
-
-import org.junit.Test;
-import org.traccar.ProtocolTest;
-
-public class Arnavi4ProtocolDecoderTest extends ProtocolTest {
-
-    @Test
-    public void testHeader1Decode() throws Exception {
-
-        Arnavi4ProtocolDecoder decoder;
-
-        decoder = new Arnavi4ProtocolDecoder(new Arnavi4Protocol());
-
-        verifyNull(decoder, binary(
-                "ff22f30c45f5c90f0300"));
-
-        verifyPositions(decoder, binary(
-                "5b01012800a3175f5903513934420447221c42055402781E0900f0c5215b4e0084005c00007c005d0000a300fa37010000295d"),
-                position("2017-07-07 05:09:55.000", true, 45.05597, 39.03347));
-    }
-
-    @Test
-    public void testHeader2Decode() throws Exception {
-
-        Arnavi4ProtocolDecoder decoder;
-
-        decoder = new Arnavi4ProtocolDecoder(new Arnavi4Protocol());
-
-        verifyNull(decoder, binary(
-                "ff23f30c45f5c90f0300"));
-
-        verifyPositions(decoder, binary(
-                "5b01012800a3175f5903513934420447221c42055402781E0900f0c5215b4e0084005c00007c005d0000a300fa3701000029012800a3175f5903513934420447221c42055402781E0900f0c5215b4e0084005c00007c005d0000a300fa37010000295d"),
-                position("2017-07-07 05:09:55.000", true, 45.05597, 39.03347));
-    }
-
-}
diff --git a/src/test/java/org/traccar/protocol/ArnaviBinaryProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/ArnaviBinaryProtocolDecoderTest.java
new file mode 100644
index 000000000..f2940de59
--- /dev/null
+++ b/src/test/java/org/traccar/protocol/ArnaviBinaryProtocolDecoderTest.java
@@ -0,0 +1,38 @@
+package org.traccar.protocol;
+
+import org.junit.Test;
+import org.traccar.ProtocolTest;
+
+public class ArnaviBinaryProtocolDecoderTest extends ProtocolTest {
+
+    @Test
+    public void testHeader1Decode() throws Exception {
+
+        ArnaviBinaryProtocolDecoder decoder;
+
+        decoder = new ArnaviBinaryProtocolDecoder(null);
+
+        verifyNull(decoder, binary(
+                "ff22f30c45f5c90f0300"));
+
+        verifyPositions(decoder, binary(
+                "5b01012800a3175f5903513934420447221c42055402781E0900f0c5215b4e0084005c00007c005d0000a300fa37010000295d"),
+                position("2017-07-07 05:09:55.000", true, 45.05597, 39.03347));
+    }
+
+    @Test
+    public void testHeader2Decode() throws Exception {
+
+        ArnaviBinaryProtocolDecoder decoder;
+
+        decoder = new ArnaviBinaryProtocolDecoder(null);
+
+        verifyNull(decoder, binary(
+                "ff23f30c45f5c90f0300"));
+
+        verifyPositions(decoder, binary(
+                "5b01012800a3175f5903513934420447221c42055402781E0900f0c5215b4e0084005c00007c005d0000a300fa3701000029012800a3175f5903513934420447221c42055402781E0900f0c5215b4e0084005c00007c005d0000a300fa37010000295d"),
+                position("2017-07-07 05:09:55.000", true, 45.05597, 39.03347));
+    }
+
+}
diff --git a/src/test/java/org/traccar/protocol/ArnaviFrameDecoderTest.java b/src/test/java/org/traccar/protocol/ArnaviFrameDecoderTest.java
new file mode 100644
index 000000000..90eb20296
--- /dev/null
+++ b/src/test/java/org/traccar/protocol/ArnaviFrameDecoderTest.java
@@ -0,0 +1,51 @@
+package org.traccar.protocol;
+
+import org.junit.Test;
+import org.traccar.ProtocolTest;
+
+public class ArnaviFrameDecoderTest extends ProtocolTest {
+
+    @Test
+    public void testDecodeValidPackets() throws Exception {
+
+        ArnaviFrameDecoder decoder = new ArnaviFrameDecoder();
+
+        verifyFrame(
+                binary("2441562c563344492c38353136342c3231342c2d312c31392c30303030344634462c30303030303935452c30433030303030322c3836333037313031333034313631382c38393939373031353630333832353236363232462c2a3039"),
+                decoder.decode(null, null, binary("2441562c563344492c38353136342c3231342c2d312c31392c30303030344634462c30303030303935452c30433030303030322c3836333037313031333034313631382c38393939373031353630333832353236363232462c2a30390d0a")));
+
+        verifyFrame(
+                binary("ff22f30c45f5c90f0300"),
+                decoder.decode(null, null, binary("ff22f30c45f5c90f0300")));
+
+        verifyFrame(
+                binary("5b01012800a3175f5903513934420447221c42055402781E0900f0c5215b4e0084005c00007c005d0000a300fa37010000295d"),
+                decoder.decode(null, null, binary("5b01012800a3175f5903513934420447221c42055402781E0900f0c5215b4e0084005c00007c005d0000a300fa37010000295d")));
+
+        verifyFrame(
+                binary("5b01012800a3175f5903513934420447221c42055402781E0900f0c5215b4e0084005c00007c005d0000a300fa3701000029012800a3175f5903513934420447221c42055402781E0900f0c5215b4e0084005c00007c005d0000a300fa37010000295d"),
+                decoder.decode(null, null, binary("5b01012800a3175f5903513934420447221c42055402781E0900f0c5215b4e0084005c00007c005d0000a300fa3701000029012800a3175f5903513934420447221c42055402781E0900f0c5215b4e0084005c00007c005d0000a300fa37010000295d")));
+
+        verifyFrame(
+                binary("5b01030700e3f16b50747261636361721b5d"),
+                decoder.decode(null, null, binary("5b01030700e3f16b50747261636361721b5d")));
+
+        verifyFrame(
+                binary("5b01030700e3f16b50747261636361721b030700e3f16b50747261636361721b5d"),
+                decoder.decode(null, null, binary("5b01030700e3f16b50747261636361721b030700e3f16b50747261636361721b5d")));
+
+        verifyFrame(
+                binary("5b01061400e3f16b5003298b5e4204cbd514420500191000080400ff021b5d"),
+                decoder.decode(null, null, binary("5b01061400e3f16b5003298b5e4204cbd514420500191000080400ff021b5d")));
+
+        verifyFrame(
+                binary("5b01061400e3f16b5003298b5e4204cbd514420500191000080400ff021b061400e3f16b5003298b5e4204cbd514420500191000080400ff021b5d"),
+                decoder.decode(null, null, binary("5b01061400e3f16b5003298b5e4204cbd514420500191000080400ff021b061400e3f16b5003298b5e4204cbd514420500191000080400ff021b5d")));
+
+        verifyFrame(
+                binary("5bfd005d"),
+                decoder.decode(null, null, binary("5bfd005d")));
+
+    }
+
+}
diff --git a/src/test/java/org/traccar/protocol/ArnaviProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/ArnaviProtocolDecoderTest.java
deleted file mode 100644
index 6b075facc..000000000
--- a/src/test/java/org/traccar/protocol/ArnaviProtocolDecoderTest.java
+++ /dev/null
@@ -1,42 +0,0 @@
-package org.traccar.protocol;
-
-import org.junit.Test;
-import org.traccar.ProtocolTest;
-
-public class ArnaviProtocolDecoderTest extends ProtocolTest {
-
-    @Test
-    public void testDecode() throws Exception {
-
-        ArnaviProtocolDecoder decoder = new ArnaviProtocolDecoder(null);
-
-        verifyPosition(decoder, text(
-                "$AV,V4,999999,12487,2277,203,65534,0,0,193,65535,65535,65535,65535,1,13,80.0,56.1,200741,5950.6773N,03029.1043E,300.0,360.0,121012,65535,65535,65535,SF*6E"));
-
-        verifyNull(decoder, text(
-                "$AV,V3DI,85164,20707,-1,19,0008C56A,000879AC,0C000002,863071013041618,89997077111301204297,*0B"));
-
-        verifyNull(decoder, text(
-                "$AV,V6SD,85164,20708,-1,3,6,37,33,*52"));
-
-        verifyAttributes(decoder, text(
-                "$AV,V4,85164,20709,1148,418,-1,0,1,192,0,0,0,0,0,0,,,000023,0000.0000N,00000.0000E,0.0,0.0,060180,0,0,32767,*4F"));
-
-        verifyNull(decoder, text(
-                "$AV,V3GSMINFO,85164,-1,20450,KMOBILE,1,2,1,23,0,40101,cc3,1,ce19,401,16,65304,5613,72,,SF*7F"));
-
-        verifyAttributes(decoder, text(
-                "$AV,V4,85164,20451,1146,418,-1,1,1,192,0,0,0,0,0,0,,,104340,0000.0000N,00000.0000E,0.0,0.0,060219,11,0,32767,,SF*47"));
-
-        verifyNull(decoder, text(
-                "$AV,V6SD,85164,20452,-1,3,3,5,6769,,SF*5D"));
-
-        verifyPosition(decoder, text(
-                "$AV,V2,32768,12487,2277,203,-1,0,0,193,0,0,1,13,200741,5950.6773N,03029.1043E,0.0,0.0,121012,*6E"));
-
-        verifyPosition(decoder, text(
-                "$AV,V3,999999,12487,2277,203,65534,0,0,193,65535,65535,65535,65535,1,13,200741,5950.6773N,03029.1043E,300.0,360.0,121012,65535,65535,65535,SF*6E"));
-
-    }
-
-}
diff --git a/src/test/java/org/traccar/protocol/ArnaviTextProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/ArnaviTextProtocolDecoderTest.java
new file mode 100644
index 000000000..065a28580
--- /dev/null
+++ b/src/test/java/org/traccar/protocol/ArnaviTextProtocolDecoderTest.java
@@ -0,0 +1,42 @@
+package org.traccar.protocol;
+
+import org.junit.Test;
+import org.traccar.ProtocolTest;
+
+public class ArnaviTextProtocolDecoderTest extends ProtocolTest {
+
+    @Test
+    public void testDecode() throws Exception {
+
+        ArnaviTextProtocolDecoder decoder = new ArnaviTextProtocolDecoder(null);
+
+        verifyPosition(decoder, text(
+                "$AV,V4,999999,12487,2277,203,65534,0,0,193,65535,65535,65535,65535,1,13,80.0,56.1,200741,5950.6773N,03029.1043E,300.0,360.0,121012,65535,65535,65535,SF*6E"));
+
+        verifyNull(decoder, text(
+                "$AV,V3DI,85164,20707,-1,19,0008C56A,000879AC,0C000002,863071013041618,89997077111301204297,*0B"));
+
+        verifyNull(decoder, text(
+                "$AV,V6SD,85164,20708,-1,3,6,37,33,*52"));
+
+        verifyAttributes(decoder, text(
+                "$AV,V4,85164,20709,1148,418,-1,0,1,192,0,0,0,0,0,0,,,000023,0000.0000N,00000.0000E,0.0,0.0,060180,0,0,32767,*4F"));
+
+        verifyNull(decoder, text(
+                "$AV,V3GSMINFO,85164,-1,20450,KMOBILE,1,2,1,23,0,40101,cc3,1,ce19,401,16,65304,5613,72,,SF*7F"));
+
+        verifyAttributes(decoder, text(
+                "$AV,V4,85164,20451,1146,418,-1,1,1,192,0,0,0,0,0,0,,,104340,0000.0000N,00000.0000E,0.0,0.0,060219,11,0,32767,,SF*47"));
+
+        verifyNull(decoder, text(
+                "$AV,V6SD,85164,20452,-1,3,3,5,6769,,SF*5D"));
+
+        verifyPosition(decoder, text(
+                "$AV,V2,32768,12487,2277,203,-1,0,0,193,0,0,1,13,200741,5950.6773N,03029.1043E,0.0,0.0,121012,*6E"));
+
+        verifyPosition(decoder, text(
+                "$AV,V3,999999,12487,2277,203,65534,0,0,193,65535,65535,65535,65535,1,13,200741,5950.6773N,03029.1043E,300.0,360.0,121012,65535,65535,65535,SF*6E"));
+
+    }
+
+}
-- 
cgit v1.2.3