diff options
author | jon-stumpf <jon.stumpf@gmail.com> | 2014-10-10 22:25:02 -0400 |
---|---|---|
committer | jon-stumpf <jon.stumpf@gmail.com> | 2014-10-21 16:01:41 -0400 |
commit | f0790eba6f3194daf4677c27e8259f783aae3207 (patch) | |
tree | 7e206023124d1e9f1705af1f11d0eaede08edab1 /test/org/traccar | |
parent | 1948e0f63202dddca607dcb51fa9a92a83e49154 (diff) | |
download | trackermap-server-f0790eba6f3194daf4677c27e8259f783aae3207.tar.gz trackermap-server-f0790eba6f3194daf4677c27e8259f783aae3207.tar.bz2 trackermap-server-f0790eba6f3194daf4677c27e8259f783aae3207.zip |
Made BaseProtocolDecoder members "final" as they should not change after construction.
Diffstat (limited to 'test/org/traccar')
67 files changed, 67 insertions, 134 deletions
diff --git a/test/org/traccar/protocol/ApelProtocolDecoderTest.java b/test/org/traccar/protocol/ApelProtocolDecoderTest.java index b094552c9..a843be8dc 100644 --- a/test/org/traccar/protocol/ApelProtocolDecoderTest.java +++ b/test/org/traccar/protocol/ApelProtocolDecoderTest.java @@ -12,8 +12,7 @@ public class ApelProtocolDecoderTest { @Test public void testDecode() throws Exception { - ApelProtocolDecoder decoder = new ApelProtocolDecoder(null); - decoder.setDataManager(new TestDataManager()); + ApelProtocolDecoder decoder = new ApelProtocolDecoder(new TestDataManager()); /*byte[] buf1 = {0x40,0x4E,0x54,0x43,0x01,0x00,0x00,0x00,0x7B,0x00,0x00,0x00,0x13,0x00,0x44,0x34,0x2A,0x3E,0x53,0x3A,0x38,0x36,0x31,0x37,0x38,0x35,0x30,0x30,0x35,0x32,0x30,0x35,0x30,0x37,0x39}; assertNull(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ByteOrder.LITTLE_ENDIAN, buf1)));*/ diff --git a/test/org/traccar/protocol/AplicomProtocolDecoderTest.java b/test/org/traccar/protocol/AplicomProtocolDecoderTest.java index 17a513f3f..49be44016 100644 --- a/test/org/traccar/protocol/AplicomProtocolDecoderTest.java +++ b/test/org/traccar/protocol/AplicomProtocolDecoderTest.java @@ -11,8 +11,7 @@ public class AplicomProtocolDecoderTest { @Test
public void testDecode() throws Exception {
- AplicomProtocolDecoder decoder = new AplicomProtocolDecoder(null);
- decoder.setDataManager(new TestDataManager());
+ AplicomProtocolDecoder decoder = new AplicomProtocolDecoder(new TestDataManager());
int[] buf1 = {0x44,0xC2,0x01,0x43,0x72,0x07,0x29,0xD6,0x84,0x00,0x43,0x03,0x1f,0xff,0x71,0x91,0xC0,0x45,0x0e,0xf9,0x06,0x45,0x0e,0xf9,0x06,0x03,0xb2,0x0b,0x80,0x03,0xb2,0x0b,0x80,0x06,0x64,0x65,0xb3,0x87,0x0c,0xe3,0x0f,0x01,0x0c,0xe3,0x0c,0xe3,0x00,0x32,0x00,0x00,0x15,0x20,0x00,0x00,0x00,0x03,0x0a,0xa2,0x00,0x00,0x3b,0x13,0x00,0x00,0x00,0x32,0x03,0x00,0x00,0x0b,0xcb,0x17,0xac,0xff,0x00,0x99,0x00,0x01,0x86,0xa0,0x02};
verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertArray(buf1))));
diff --git a/test/org/traccar/protocol/AtrackProtocolDecoderTest.java b/test/org/traccar/protocol/AtrackProtocolDecoderTest.java index 1cdaa8363..4d94c004f 100644 --- a/test/org/traccar/protocol/AtrackProtocolDecoderTest.java +++ b/test/org/traccar/protocol/AtrackProtocolDecoderTest.java @@ -12,8 +12,7 @@ public class AtrackProtocolDecoderTest { @Test public void testDecode() throws Exception { - AtrackProtocolDecoder decoder = new AtrackProtocolDecoder(null); - decoder.setDataManager(new TestDataManager()); + AtrackProtocolDecoder decoder = new AtrackProtocolDecoder(new TestDataManager()); //int[] buf1 = {0xfe,0x02,0x00,0x01,0x41,0x04,0xd8,0xf1,0x96,0x82,0x00,0x01}; //assertNull(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertArray(buf1)))); diff --git a/test/org/traccar/protocol/BoxProtocolDecoderTest.java b/test/org/traccar/protocol/BoxProtocolDecoderTest.java index 897b5071c..e0a4dfa2e 100644 --- a/test/org/traccar/protocol/BoxProtocolDecoderTest.java +++ b/test/org/traccar/protocol/BoxProtocolDecoderTest.java @@ -10,8 +10,7 @@ public class BoxProtocolDecoderTest { @Test public void testDecode() throws Exception { - BoxProtocolDecoder decoder = new BoxProtocolDecoder(null); - decoder.setDataManager(new TestDataManager()); + BoxProtocolDecoder decoder = new BoxProtocolDecoder(new TestDataManager()); assertNull(decoder.decode(null, null, "H,BT,358281002435893,081028142432,F5813D19,6D6E6DC2")); diff --git a/test/org/traccar/protocol/CarTrackProtocolDecoderTest.java b/test/org/traccar/protocol/CarTrackProtocolDecoderTest.java index 96a8e4b74..62a3b5c3a 100644 --- a/test/org/traccar/protocol/CarTrackProtocolDecoderTest.java +++ b/test/org/traccar/protocol/CarTrackProtocolDecoderTest.java @@ -9,8 +9,7 @@ public class CarTrackProtocolDecoderTest { @Test public void testDecode() throws Exception { - CarTrackProtocolDecoder decoder = new CarTrackProtocolDecoder(null); - decoder.setDataManager(new TestDataManager()); + CarTrackProtocolDecoder decoder = new CarTrackProtocolDecoder(new TestDataManager()); verify(decoder.decode(null, null, "$$2222234???????&A9955&B102904.000,A,2233.0655,N,11404.9440,E,0.00,,030109,,*17|6.3|&C0100000100&D000024?>&E10000000&Y00100020")); diff --git a/test/org/traccar/protocol/CarscopProtocolDecoderTest.java b/test/org/traccar/protocol/CarscopProtocolDecoderTest.java index 5978ab7b1..4ec3a14d4 100644 --- a/test/org/traccar/protocol/CarscopProtocolDecoderTest.java +++ b/test/org/traccar/protocol/CarscopProtocolDecoderTest.java @@ -10,8 +10,7 @@ public class CarscopProtocolDecoderTest { @Test public void testDecode() throws Exception { - CarscopProtocolDecoder decoder = new CarscopProtocolDecoder(null); - decoder.setDataManager(new TestDataManager()); + CarscopProtocolDecoder decoder = new CarscopProtocolDecoder(new TestDataManager()); verify(decoder.decode(null, null, "*040331141830UB05123456789012345061825A2934.0133N10627.2544E000.0040331309.6200000000L000000")); diff --git a/test/org/traccar/protocol/CellocatorProtocolDecoderTest.java b/test/org/traccar/protocol/CellocatorProtocolDecoderTest.java index 2788e6ba1..054be2e0f 100644 --- a/test/org/traccar/protocol/CellocatorProtocolDecoderTest.java +++ b/test/org/traccar/protocol/CellocatorProtocolDecoderTest.java @@ -12,8 +12,7 @@ public class CellocatorProtocolDecoderTest { @Test public void testDecode() throws Exception { - CellocatorProtocolDecoder decoder = new CellocatorProtocolDecoder(null); - decoder.setDataManager(new TestDataManager()); + CellocatorProtocolDecoder decoder = new CellocatorProtocolDecoder(new TestDataManager()); int[] buf1 = {0x4D,0x43,0x47,0x50,0x00,0x06,0x00,0x00,0x00,0x08,0x1A,0x02,0x02,0x12,0x04,0x00,0x00,0x00,0x21,0x00,0x62,0x30,0x00,0x00,0x00,0x6B,0x00,0xE1,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xE5,0xA1,0x00,0x04,0x02,0x06,0x61,0x4E,0xA3,0x03,0x18,0x1A,0x57,0x03,0x4E,0x12,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x15,0x25,0x07,0x14,0x03,0xD6,0x07,0x49}; verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ByteOrder.LITTLE_ENDIAN, ChannelBufferTools.convertArray(buf1)))); diff --git a/test/org/traccar/protocol/EasyTrackProtocolDecoderTest.java b/test/org/traccar/protocol/EasyTrackProtocolDecoderTest.java index 0160d4367..8a82c5901 100644 --- a/test/org/traccar/protocol/EasyTrackProtocolDecoderTest.java +++ b/test/org/traccar/protocol/EasyTrackProtocolDecoderTest.java @@ -10,8 +10,7 @@ public class EasyTrackProtocolDecoderTest { @Test public void testDecode() throws Exception { - EasyTrackProtocolDecoder decoder = new EasyTrackProtocolDecoder(null); - decoder.setDataManager(new TestDataManager()); + EasyTrackProtocolDecoder decoder = new EasyTrackProtocolDecoder(new TestDataManager()); assertNull(decoder.decode(null, null, "*ET,135790246811221,GZ,0001,0005")); diff --git a/test/org/traccar/protocol/EelinkProtocolDecoderTest.java b/test/org/traccar/protocol/EelinkProtocolDecoderTest.java index f9dd1d6bb..4d87ef144 100644 --- a/test/org/traccar/protocol/EelinkProtocolDecoderTest.java +++ b/test/org/traccar/protocol/EelinkProtocolDecoderTest.java @@ -12,8 +12,7 @@ public class EelinkProtocolDecoderTest { @Test public void testDecode() throws Exception { - EelinkProtocolDecoder decoder = new EelinkProtocolDecoder(null); - decoder.setDataManager(new TestDataManager()); + EelinkProtocolDecoder decoder = new EelinkProtocolDecoder(new TestDataManager()); assertNull(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertArray( new int[] {0x67,0x67,0x01,0x00,0x0b,0x00,0x1b,0x03,0x54,0x18,0x80,0x46,0x61,0x83,0x49,0x01})))); diff --git a/test/org/traccar/protocol/EnforaProtocolDecoderTest.java b/test/org/traccar/protocol/EnforaProtocolDecoderTest.java index 974956dbb..38c63d16b 100644 --- a/test/org/traccar/protocol/EnforaProtocolDecoderTest.java +++ b/test/org/traccar/protocol/EnforaProtocolDecoderTest.java @@ -14,8 +14,7 @@ public class EnforaProtocolDecoderTest { @Test public void testDecode() throws Exception { - EnforaProtocolDecoder decoder = new EnforaProtocolDecoder(null); - decoder.setDataManager(new TestDataManager()); + EnforaProtocolDecoder decoder = new EnforaProtocolDecoder(new TestDataManager()); ChannelBufferFactory factory = new HeapChannelBufferFactory(); assertNull(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertArray( diff --git a/test/org/traccar/protocol/Ev603ProtocolDecoderTest.java b/test/org/traccar/protocol/Ev603ProtocolDecoderTest.java index 230ad238a..8be4a7596 100644 --- a/test/org/traccar/protocol/Ev603ProtocolDecoderTest.java +++ b/test/org/traccar/protocol/Ev603ProtocolDecoderTest.java @@ -10,8 +10,7 @@ public class Ev603ProtocolDecoderTest { @Test public void testDecode() throws Exception { - Ev603ProtocolDecoder decoder = new Ev603ProtocolDecoder(null); - decoder.setDataManager(new TestDataManager()); + Ev603ProtocolDecoder decoder = new Ev603ProtocolDecoder(new TestDataManager()); assertNull(decoder.decode(null, null, "!1,123456789012345")); diff --git a/test/org/traccar/protocol/FreedomProtocolDecoderTest.java b/test/org/traccar/protocol/FreedomProtocolDecoderTest.java index ead8c980b..acd495d91 100644 --- a/test/org/traccar/protocol/FreedomProtocolDecoderTest.java +++ b/test/org/traccar/protocol/FreedomProtocolDecoderTest.java @@ -10,8 +10,7 @@ public class FreedomProtocolDecoderTest { @Test public void testDecode() throws Exception { - FreedomProtocolDecoder decoder = new FreedomProtocolDecoder(null); - decoder.setDataManager(new TestDataManager()); + FreedomProtocolDecoder decoder = new FreedomProtocolDecoder(new TestDataManager()); verify(decoder.decode(null, null, "IMEI,353358011714362,2014/05/22, 20:49:32, N, Lat:4725.9624, E, Lon:01912.5483, Spd:5.05")); diff --git a/test/org/traccar/protocol/GalileoProtocolDecoderTest.java b/test/org/traccar/protocol/GalileoProtocolDecoderTest.java index e76d0378f..5d1e06230 100644 --- a/test/org/traccar/protocol/GalileoProtocolDecoderTest.java +++ b/test/org/traccar/protocol/GalileoProtocolDecoderTest.java @@ -13,8 +13,7 @@ public class GalileoProtocolDecoderTest { @Test public void testDecode() throws Exception { - GalileoProtocolDecoder decoder = new GalileoProtocolDecoder(null); - decoder.setDataManager(new TestDataManager()); + GalileoProtocolDecoder decoder = new GalileoProtocolDecoder(new TestDataManager()); int[] buf1 = {0x01,0x13,(byte)0x80,0x03,0x38,0x36,0x38,0x32,0x30,0x34,0x30,0x30,0x31,0x35,0x34,0x39,0x30,0x38,0x37,0x04,0x32,0x00,(byte)0x85,(byte)0x90}; assertNull(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ByteOrder.LITTLE_ENDIAN, ChannelBufferTools.convertArray(buf1)))); diff --git a/test/org/traccar/protocol/GatorProtocolDecoderTest.java b/test/org/traccar/protocol/GatorProtocolDecoderTest.java index 251987cb0..dac0b5b7d 100644 --- a/test/org/traccar/protocol/GatorProtocolDecoderTest.java +++ b/test/org/traccar/protocol/GatorProtocolDecoderTest.java @@ -11,8 +11,7 @@ public class GatorProtocolDecoderTest { @Test public void testDecode() throws Exception { - GatorProtocolDecoder decoder = new GatorProtocolDecoder(null); - decoder.setDataManager(new TestDataManager()); + GatorProtocolDecoder decoder = new GatorProtocolDecoder(new TestDataManager()); int[] buf1 = {0x24,0x24,0x81,0x00,0x23,0x0C,0xA2,0x32,0x85,0x10,0x03,0x06,0x14,0x59,0x07,0x02,0x23,0x46,0x90,0x11,0x35,0x29,0x47,0x00,0x00,0x00,0x00,0xC0,0x40,0x01,0x01,0x2C,0x0E,0x11,0x00,0x00,0x00,0x21,0xCB,0x0D}; verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertArray(buf1)))); diff --git a/test/org/traccar/protocol/Gl100ProtocolDecoderTest.java b/test/org/traccar/protocol/Gl100ProtocolDecoderTest.java index b7aaef5b8..149279224 100644 --- a/test/org/traccar/protocol/Gl100ProtocolDecoderTest.java +++ b/test/org/traccar/protocol/Gl100ProtocolDecoderTest.java @@ -10,8 +10,7 @@ public class Gl100ProtocolDecoderTest { @Test public void testDecode() throws Exception { - Gl100ProtocolDecoder decoder = new Gl100ProtocolDecoder(null); - decoder.setDataManager(new TestDataManager()); + Gl100ProtocolDecoder decoder = new Gl100ProtocolDecoder(new TestDataManager()); assertNull(decoder.decode(null, null, "AT+GTHBD=HeartBeat,359231030000010,20090101000000,11F0,0102120204")); diff --git a/test/org/traccar/protocol/Gl200ProtocolDecoderTest.java b/test/org/traccar/protocol/Gl200ProtocolDecoderTest.java index 585440fa3..9d2b233a9 100644 --- a/test/org/traccar/protocol/Gl200ProtocolDecoderTest.java +++ b/test/org/traccar/protocol/Gl200ProtocolDecoderTest.java @@ -10,8 +10,7 @@ public class Gl200ProtocolDecoderTest { @Test public void testDecode() throws Exception { - Gl200ProtocolDecoder decoder = new Gl200ProtocolDecoder(null); - decoder.setDataManager(new TestDataManager()); + Gl200ProtocolDecoder decoder = new Gl200ProtocolDecoder(new TestDataManager()); verify(decoder.decode(null, null, "+RESP:GTFRI,02010D,867844001675407,,0,0,1,2,0.0,0,28.9,8.591011,56.476397,20140915213209,0238,0001,03CB,2871,,97,20140915213459,009A")); diff --git a/test/org/traccar/protocol/GlobalSatProtocolDecoderTest.java b/test/org/traccar/protocol/GlobalSatProtocolDecoderTest.java index 2f986155a..68a3dc8cf 100644 --- a/test/org/traccar/protocol/GlobalSatProtocolDecoderTest.java +++ b/test/org/traccar/protocol/GlobalSatProtocolDecoderTest.java @@ -10,8 +10,7 @@ public class GlobalSatProtocolDecoderTest { @Test public void testDecode() throws Exception { - GlobalSatProtocolDecoder decoder = new GlobalSatProtocolDecoder(null); - decoder.setDataManager(new TestDataManager()); + GlobalSatProtocolDecoder decoder = new GlobalSatProtocolDecoder(new TestDataManager()); assertNull(decoder.decode(null, null, "GSh,131826789036289,3,M,ea04*3d")); diff --git a/test/org/traccar/protocol/GotopProtocolDecoderTest.java b/test/org/traccar/protocol/GotopProtocolDecoderTest.java index d0e290b61..fe999fc1a 100644 --- a/test/org/traccar/protocol/GotopProtocolDecoderTest.java +++ b/test/org/traccar/protocol/GotopProtocolDecoderTest.java @@ -10,8 +10,7 @@ public class GotopProtocolDecoderTest { @Test public void testDecode() throws Exception { - GotopProtocolDecoder decoder = new GotopProtocolDecoder(null); - decoder.setDataManager(new TestDataManager()); + GotopProtocolDecoder decoder = new GotopProtocolDecoder(new TestDataManager()); assertNull(decoder.decode(null, null, "")); diff --git a/test/org/traccar/protocol/Gps103ProtocolDecoderTest.java b/test/org/traccar/protocol/Gps103ProtocolDecoderTest.java index 655d4f05f..75b7279f8 100644 --- a/test/org/traccar/protocol/Gps103ProtocolDecoderTest.java +++ b/test/org/traccar/protocol/Gps103ProtocolDecoderTest.java @@ -10,8 +10,7 @@ public class Gps103ProtocolDecoderTest { @Test public void testDecode() throws Exception { - Gps103ProtocolDecoder decoder = new Gps103ProtocolDecoder(null); - decoder.setDataManager(new TestDataManager()); + Gps103ProtocolDecoder decoder = new Gps103ProtocolDecoder(new TestDataManager()); // Log on request assertNull(decoder.decode(null, null, null, "##,imei:359586015829802,A")); diff --git a/test/org/traccar/protocol/GpsGateProtocolDecoderTest.java b/test/org/traccar/protocol/GpsGateProtocolDecoderTest.java index 3e1d8d6b9..312232b9b 100644 --- a/test/org/traccar/protocol/GpsGateProtocolDecoderTest.java +++ b/test/org/traccar/protocol/GpsGateProtocolDecoderTest.java @@ -10,8 +10,7 @@ public class GpsGateProtocolDecoderTest { @Test public void testDecode() throws Exception { - GpsGateProtocolDecoder decoder = new GpsGateProtocolDecoder(null); - decoder.setDataManager(new TestDataManager()); + GpsGateProtocolDecoder decoder = new GpsGateProtocolDecoder(new TestDataManager()); assertNull(decoder.decode(null, null, "$FRLIN,,user1,8IVHF*7A")); diff --git a/test/org/traccar/protocol/Gt02ProtocolDecoderTest.java b/test/org/traccar/protocol/Gt02ProtocolDecoderTest.java index 8d537685e..b7b3b2f1f 100644 --- a/test/org/traccar/protocol/Gt02ProtocolDecoderTest.java +++ b/test/org/traccar/protocol/Gt02ProtocolDecoderTest.java @@ -12,8 +12,7 @@ public class Gt02ProtocolDecoderTest { @Test public void testDecode() throws Exception { - Gt02ProtocolDecoder decoder = new Gt02ProtocolDecoder(null); - decoder.setDataManager(new TestDataManager()); + Gt02ProtocolDecoder decoder = new Gt02ProtocolDecoder(new TestDataManager()); verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertArray( new int[] {0x68,0x68,0x25,0x00,0x00,0x01,0x23,0x45,0x67,0x89,0x01,0x23,0x45,0x00,0x01,0x10,0x01,0x01,0x01,0x01,0x01,0x01,0x02,0x6B,0x3F,0x3E,0x02,0x6B,0x3F,0x3E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x0D,0x0A})))); diff --git a/test/org/traccar/protocol/Gt06ProtocolDecoderTest.java b/test/org/traccar/protocol/Gt06ProtocolDecoderTest.java index a910cb618..de52dce1f 100644 --- a/test/org/traccar/protocol/Gt06ProtocolDecoderTest.java +++ b/test/org/traccar/protocol/Gt06ProtocolDecoderTest.java @@ -12,8 +12,7 @@ public class Gt06ProtocolDecoderTest { @Test public void testDecode() throws Exception { - Gt06ProtocolDecoder decoder = new Gt06ProtocolDecoder(null); - decoder.setDataManager(new TestDataManager()); + Gt06ProtocolDecoder decoder = new Gt06ProtocolDecoder(new TestDataManager()); assertNull(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertArray( new int[] {0x78,0x78,0x11,0x01,0x01,0x23,0x45,0x67,0x89,0x01,0x23,0x45,0x10,0x0B,0x32,0x01,0x00,0x01,0x71,0x93,0x0D,0x0A})))); diff --git a/test/org/traccar/protocol/H02ProtocolDecoderTest.java b/test/org/traccar/protocol/H02ProtocolDecoderTest.java index d2a602744..47d20c89b 100644 --- a/test/org/traccar/protocol/H02ProtocolDecoderTest.java +++ b/test/org/traccar/protocol/H02ProtocolDecoderTest.java @@ -13,8 +13,7 @@ public class H02ProtocolDecoderTest { @Test public void testDecode() throws Exception { - H02ProtocolDecoder decoder = new H02ProtocolDecoder(null); - decoder.setDataManager(new TestDataManager()); + H02ProtocolDecoder decoder = new H02ProtocolDecoder(new TestDataManager()); assertNull(decoder.decode(null, null, ChannelBuffers.copiedBuffer( "*HQ,353588020068342,V1,000000,V,0.0000,0,0.0000,0,0.00,0.00,000000,ffffffff,000106,000002,000203,004c87,16#", Charset.defaultCharset()))); diff --git a/test/org/traccar/protocol/HaicomProtocolDecoderTest.java b/test/org/traccar/protocol/HaicomProtocolDecoderTest.java index aca184b4a..c46c8afe3 100644 --- a/test/org/traccar/protocol/HaicomProtocolDecoderTest.java +++ b/test/org/traccar/protocol/HaicomProtocolDecoderTest.java @@ -9,8 +9,7 @@ public class HaicomProtocolDecoderTest { @Test public void testDecode() throws Exception { - HaicomProtocolDecoder decoder = new HaicomProtocolDecoder(null); - decoder.setDataManager(new TestDataManager()); + HaicomProtocolDecoder decoder = new HaicomProtocolDecoder(new TestDataManager()); verify(decoder.decode(null, null, "$GPRS123456789012345,602S19A,100915,063515,7240649312041079,0019,3156,111000,10004,0000,11111,00LH#V037")); diff --git a/test/org/traccar/protocol/IntellitracProtocolDecoderTest.java b/test/org/traccar/protocol/IntellitracProtocolDecoderTest.java index 9557797b7..2fc9b8201 100644 --- a/test/org/traccar/protocol/IntellitracProtocolDecoderTest.java +++ b/test/org/traccar/protocol/IntellitracProtocolDecoderTest.java @@ -10,8 +10,7 @@ public class IntellitracProtocolDecoderTest { @Test public void testDecode() throws Exception { - IntellitracProtocolDecoder decoder = new IntellitracProtocolDecoder(null); - decoder.setDataManager(new TestDataManager()); + IntellitracProtocolDecoder decoder = new IntellitracProtocolDecoder(new TestDataManager()); assertNull(decoder.decode(null, null, "$OK:TRACKING")); diff --git a/test/org/traccar/protocol/Jt600ProtocolDecoderTest.java b/test/org/traccar/protocol/Jt600ProtocolDecoderTest.java index 064c15927..4a90e8d55 100644 --- a/test/org/traccar/protocol/Jt600ProtocolDecoderTest.java +++ b/test/org/traccar/protocol/Jt600ProtocolDecoderTest.java @@ -11,8 +11,7 @@ public class Jt600ProtocolDecoderTest { @Test public void testDecode() throws Exception { - Jt600ProtocolDecoder decoder = new Jt600ProtocolDecoder(null); - decoder.setDataManager(new TestDataManager()); + Jt600ProtocolDecoder decoder = new Jt600ProtocolDecoder(new TestDataManager()); byte[] buf1 = {0x24,0x31,0x10,0x21,0x60,0x01,0x11,0x00,0x1B,0x16,0x02,0x11,0x05,0x59,0x10,0x22,0x32,(byte)0x98,0x62,0x11,0x40,0x46,0x22,0x7B,0x05,(byte)0x98,0x09,0x50,(byte)0x80,0x01,0x23,0x27,(byte)0x95,0x14,0x35,0x16,0x1F}; verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(buf1))); diff --git a/test/org/traccar/protocol/KhdProtocolDecoderTest.java b/test/org/traccar/protocol/KhdProtocolDecoderTest.java index 2c9b3560e..9f6aecf37 100644 --- a/test/org/traccar/protocol/KhdProtocolDecoderTest.java +++ b/test/org/traccar/protocol/KhdProtocolDecoderTest.java @@ -12,8 +12,7 @@ public class KhdProtocolDecoderTest { @Test public void testDecode() throws Exception { - KhdProtocolDecoder decoder = new KhdProtocolDecoder(null); - decoder.setDataManager(new TestDataManager()); + KhdProtocolDecoder decoder = new KhdProtocolDecoder(new TestDataManager()); assertNull(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertArray( new int[] {0x29,0x29,0xb1,0x00,0x06,0x05,0x16,0x29,0x35,0xb8,0x0d})))); diff --git a/test/org/traccar/protocol/LaipacProtocolDecoderTest.java b/test/org/traccar/protocol/LaipacProtocolDecoderTest.java index b348fd895..b66cf818e 100644 --- a/test/org/traccar/protocol/LaipacProtocolDecoderTest.java +++ b/test/org/traccar/protocol/LaipacProtocolDecoderTest.java @@ -10,8 +10,7 @@ public class LaipacProtocolDecoderTest { @Test public void testDecode() throws Exception { - LaipacProtocolDecoder decoder = new LaipacProtocolDecoder(null); - decoder.setDataManager(new TestDataManager()); + LaipacProtocolDecoder decoder = new LaipacProtocolDecoder(new TestDataManager()); assertNull(decoder.decode(null, null, "$AVSYS,99999999,V1.50,SN0000103,32768*15")); diff --git a/test/org/traccar/protocol/M2mProtocolDecoderTest.java b/test/org/traccar/protocol/M2mProtocolDecoderTest.java index 097a783bc..bfe6f0df9 100644 --- a/test/org/traccar/protocol/M2mProtocolDecoderTest.java +++ b/test/org/traccar/protocol/M2mProtocolDecoderTest.java @@ -12,8 +12,7 @@ public class M2mProtocolDecoderTest { @Test public void testDecode() throws Exception { - M2mProtocolDecoder decoder = new M2mProtocolDecoder(null); - decoder.setDataManager(new TestDataManager()); + M2mProtocolDecoder decoder = new M2mProtocolDecoder(new TestDataManager()); int[] buf1 = {0x23,0x5A,0x3C,0x2A,0x26,0x24,0x21,0x5C,0x28,0x7D,0x70,0x21,0x2A,0x21,0x25,0x4C,0x7C,0x64,0x21,0x22,0x0B,0x0B,0x0B}; assertNull(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertArray(buf1)))); diff --git a/test/org/traccar/protocol/ManPowerProtocolDecoderTest.java b/test/org/traccar/protocol/ManPowerProtocolDecoderTest.java index eba2bc3f0..a12b93b0e 100644 --- a/test/org/traccar/protocol/ManPowerProtocolDecoderTest.java +++ b/test/org/traccar/protocol/ManPowerProtocolDecoderTest.java @@ -9,8 +9,7 @@ public class ManPowerProtocolDecoderTest { @Test public void testDecode() throws Exception { - ManPowerProtocolDecoder decoder = new ManPowerProtocolDecoder(null); - decoder.setDataManager(new TestDataManager()); + ManPowerProtocolDecoder decoder = new ManPowerProtocolDecoder(new TestDataManager()); verify(decoder.decode(null, null, "simei:352581250259539,,,tracker,51,24,1.73,130426023608,A,3201.5462,N,03452.2975,E,0.01,28B9,1DED,425,01,1x0x0*0x1*60x+2,en-us,")); diff --git a/test/org/traccar/protocol/MegastekProtocolDecoderTest.java b/test/org/traccar/protocol/MegastekProtocolDecoderTest.java index f7d682dba..99a40f8de 100644 --- a/test/org/traccar/protocol/MegastekProtocolDecoderTest.java +++ b/test/org/traccar/protocol/MegastekProtocolDecoderTest.java @@ -9,8 +9,7 @@ public class MegastekProtocolDecoderTest { @Test public void testDecode() throws Exception { - MegastekProtocolDecoder decoder = new MegastekProtocolDecoder(null); - decoder.setDataManager(new TestDataManager()); + MegastekProtocolDecoder decoder = new MegastekProtocolDecoder(new TestDataManager()); verify(decoder.decode(null, null, "STX,GerAL22,$GPRMC,174752.000,A,3637.060059,S,6416.2354,W,0.00,0.00,030812,,,A*55,F,,imei:861785000249353,05,180.6,Battery=100%,,1,722,310,0FA6,39D0;8F")); diff --git a/test/org/traccar/protocol/MeiligaoProtocolDecoderTest.java b/test/org/traccar/protocol/MeiligaoProtocolDecoderTest.java index 66aea768c..bc053ce85 100644 --- a/test/org/traccar/protocol/MeiligaoProtocolDecoderTest.java +++ b/test/org/traccar/protocol/MeiligaoProtocolDecoderTest.java @@ -12,8 +12,7 @@ public class MeiligaoProtocolDecoderTest { @Test public void testDecode() throws Exception { - MeiligaoProtocolDecoder decoder = new MeiligaoProtocolDecoder(null); - decoder.setDataManager(new TestDataManager()); + MeiligaoProtocolDecoder decoder = new MeiligaoProtocolDecoder(new TestDataManager()); assertNull(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertArray( new int[]{0x24,0x24,0x00,0x00,0x12,0x34,0x56,0xFF,0xFF,0xFF,0xFF,0x50,0x00,0x8B,0x9B,0x0D,0x0A})))); diff --git a/test/org/traccar/protocol/MeitrackProtocolDecoderTest.java b/test/org/traccar/protocol/MeitrackProtocolDecoderTest.java index fe7c31b92..81bbd0464 100644 --- a/test/org/traccar/protocol/MeitrackProtocolDecoderTest.java +++ b/test/org/traccar/protocol/MeitrackProtocolDecoderTest.java @@ -13,8 +13,7 @@ public class MeitrackProtocolDecoderTest { @Test public void testDecode() throws Exception { - MeitrackProtocolDecoder decoder = new MeitrackProtocolDecoder(null); - decoder.setDataManager(new TestDataManager()); + MeitrackProtocolDecoder decoder = new MeitrackProtocolDecoder(new TestDataManager()); verify(decoder.decode(null, null, ChannelBuffers.copiedBuffer( "$$X138,862170010187175,AAA,35,-29.960365,-51.655455,130507201625,A,8,9,0,107,0.9,7,169322,126582,724|6|0547|132B,0000,0009|000A||0278|0000,*BE", Charset.defaultCharset()))); diff --git a/test/org/traccar/protocol/MiniFinderProtocolDecoderTest.java b/test/org/traccar/protocol/MiniFinderProtocolDecoderTest.java index d484d6660..6ecfd01cf 100644 --- a/test/org/traccar/protocol/MiniFinderProtocolDecoderTest.java +++ b/test/org/traccar/protocol/MiniFinderProtocolDecoderTest.java @@ -10,8 +10,7 @@ public class MiniFinderProtocolDecoderTest { @Test public void testDecode() throws Exception { - MiniFinderProtocolDecoder decoder = new MiniFinderProtocolDecoder(null); - decoder.setDataManager(new TestDataManager()); + MiniFinderProtocolDecoder decoder = new MiniFinderProtocolDecoder(new TestDataManager()); assertNull(decoder.decode(null, null, "!1,860719020212696")); diff --git a/test/org/traccar/protocol/NavigilProtocolDecoderTest.java b/test/org/traccar/protocol/NavigilProtocolDecoderTest.java index febfb5346..e670872ff 100644 --- a/test/org/traccar/protocol/NavigilProtocolDecoderTest.java +++ b/test/org/traccar/protocol/NavigilProtocolDecoderTest.java @@ -12,8 +12,7 @@ public class NavigilProtocolDecoderTest { @Test public void testDecode() throws Exception { - NavigilProtocolDecoder decoder = new NavigilProtocolDecoder(null); - decoder.setDataManager(new TestDataManager()); + NavigilProtocolDecoder decoder = new NavigilProtocolDecoder(new TestDataManager()); byte[] buf1 = {0x01,0x00,0x43,0x00,0x04,0x00,0x20,0x00,0x00,0x00,(byte)0xf6,0x02,0x03,0x08,0x02,0x00,(byte)0xe7,(byte)0xcd,0x0f,0x51,0x0c,0x00,0x00,0x00,0x3b,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; assertNull(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ByteOrder.LITTLE_ENDIAN, buf1))); diff --git a/test/org/traccar/protocol/NavisProtocolDecoderTest.java b/test/org/traccar/protocol/NavisProtocolDecoderTest.java index 2b292d775..78f7cb0bd 100644 --- a/test/org/traccar/protocol/NavisProtocolDecoderTest.java +++ b/test/org/traccar/protocol/NavisProtocolDecoderTest.java @@ -12,8 +12,7 @@ public class NavisProtocolDecoderTest { @Test public void testDecode() throws Exception { - NavisProtocolDecoder decoder = new NavisProtocolDecoder(null); - decoder.setDataManager(new TestDataManager()); + NavisProtocolDecoder decoder = new NavisProtocolDecoder(new TestDataManager()); byte[] buf1 = {0x40,0x4E,0x54,0x43,0x01,0x00,0x00,0x00,0x7B,0x00,0x00,0x00,0x13,0x00,0x44,0x34,0x2A,0x3E,0x53,0x3A,0x38,0x36,0x31,0x37,0x38,0x35,0x30,0x30,0x35,0x32,0x30,0x35,0x30,0x37,0x39}; assertNull(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ByteOrder.LITTLE_ENDIAN, buf1))); diff --git a/test/org/traccar/protocol/NoranProtocolDecoderTest.java b/test/org/traccar/protocol/NoranProtocolDecoderTest.java index 9d787c38f..8cf685fdc 100644 --- a/test/org/traccar/protocol/NoranProtocolDecoderTest.java +++ b/test/org/traccar/protocol/NoranProtocolDecoderTest.java @@ -13,8 +13,7 @@ public class NoranProtocolDecoderTest { @Test public void testDecode() throws Exception { - NoranProtocolDecoder decoder = new NoranProtocolDecoder(null); - decoder.setDataManager(new TestDataManager()); + NoranProtocolDecoder decoder = new NoranProtocolDecoder(new TestDataManager()); int[] buf1 = {0x0f,0x00,0x00,0x00,0x4e,0x52,0x30,0x39,0x46,0x30,0x34,0x31,0x35,0x35,0x00}; assertNull(decoder.decode(null, null, null, ChannelBuffers.wrappedBuffer(ByteOrder.LITTLE_ENDIAN, ChannelBufferTools.convertArray(buf1)))); diff --git a/test/org/traccar/protocol/OrionProtocolDecoderTest.java b/test/org/traccar/protocol/OrionProtocolDecoderTest.java index 9e37ab5a1..3ec8b257e 100644 --- a/test/org/traccar/protocol/OrionProtocolDecoderTest.java +++ b/test/org/traccar/protocol/OrionProtocolDecoderTest.java @@ -13,8 +13,7 @@ public class OrionProtocolDecoderTest { @Test public void testDecode() throws Exception { - OrionProtocolDecoder decoder = new OrionProtocolDecoder(null); - decoder.setDataManager(new TestDataManager()); + OrionProtocolDecoder decoder = new OrionProtocolDecoder(new TestDataManager()); verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ByteOrder.LITTLE_ENDIAN, ChannelBufferTools.convertArray( new int[] {0x50,0x57,0x00,0x41,0x07,0x36,0x7C,0x24,0x2B,0x44,0x09,0x01,0xAD,0xE9,0x7D,0x01,0x63,0x14,0x3B,0x07,0xB0,0x03,0x00,0x00,0x00,0x00,0x0D,0x04,0x19,0x17,0x38,0x2D,0x00,0x0B,0x01,0x01,0x00,0x05,0x11,0x00,0x00,0x00,0x00,0x06,0x82,0x05,0x00,0x00,0x00,0x8E,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x8C,0x03,0x00,0x84,0x03,0x00,0x85,0x03,0x00,0x09,0x0A,0x00,0x00,0x00,0x00,0x48,0x01,0x00,0x00,0x00,0x8A,0xFC})))); diff --git a/test/org/traccar/protocol/OsmAndProtocolDecoderTest.java b/test/org/traccar/protocol/OsmAndProtocolDecoderTest.java index 8ab636c05..32bba92b7 100644 --- a/test/org/traccar/protocol/OsmAndProtocolDecoderTest.java +++ b/test/org/traccar/protocol/OsmAndProtocolDecoderTest.java @@ -12,8 +12,7 @@ public class OsmAndProtocolDecoderTest { @Test public void testDecode() throws Exception { - OsmAndProtocolDecoder decoder = new OsmAndProtocolDecoder(null); - decoder.setDataManager(new TestDataManager()); + OsmAndProtocolDecoder decoder = new OsmAndProtocolDecoder(new TestDataManager()); verify(decoder.decode(null, null, new DefaultHttpRequest(HttpVersion.HTTP_1_1, HttpMethod.GET, "/?lat=49.60688&lon=6.15788×tamp=2014-06-04+09%3A10%3A11&altitude=384.7&speed=0.0&id=353861053849681"))); diff --git a/test/org/traccar/protocol/PiligrimProtocolDecoderTest.java b/test/org/traccar/protocol/PiligrimProtocolDecoderTest.java index 1051b0d4d..b2a33c63c 100644 --- a/test/org/traccar/protocol/PiligrimProtocolDecoderTest.java +++ b/test/org/traccar/protocol/PiligrimProtocolDecoderTest.java @@ -16,8 +16,7 @@ public class PiligrimProtocolDecoderTest { @Test public void testDecode() throws Exception { - PiligrimProtocolDecoder decoder = new PiligrimProtocolDecoder(null); - decoder.setDataManager(new TestDataManager()); + PiligrimProtocolDecoder decoder = new PiligrimProtocolDecoder(new TestDataManager()); HttpRequest msg1 = new DefaultHttpRequest(HttpVersion.HTTP_1_1, HttpMethod.POST, "/bingps?imei=868204005544720&csq=18&vout=00&vin=4050&dataid=00000000"); int[] buf1 = {0xff,0xf2,0x20,0x0d,0x41,0x10,0x06,0x1a,0x32,0x35,0x4f,0x34,0x22,0x31,0x00,0x62,0x00,0x0a,0x00,0x05,0x17,0x3b,0x00,0x00,0xa1,0x01,0x00,0x03,0x00,0x00,0x5e,0x00,0xff,0xf2,0x20,0x0d,0x41,0x10,0x10,0x09,0x32,0x35,0x4f,0x2b,0x22,0x31,0x00,0x42,0x00,0x0b,0x00,0x0e,0x17,0x3b,0x00,0x00,0x9f,0x01,0x00,0x07,0x00,0x00,0x60,0x00}; diff --git a/test/org/traccar/protocol/Pt3000ProtocolDecoderTest.java b/test/org/traccar/protocol/Pt3000ProtocolDecoderTest.java index f06d2312b..cbc31b1b6 100644 --- a/test/org/traccar/protocol/Pt3000ProtocolDecoderTest.java +++ b/test/org/traccar/protocol/Pt3000ProtocolDecoderTest.java @@ -9,8 +9,7 @@ public class Pt3000ProtocolDecoderTest { @Test public void testDecode() throws Exception { - Pt3000ProtocolDecoder decoder = new Pt3000ProtocolDecoder(null); - decoder.setDataManager(new TestDataManager()); + Pt3000ProtocolDecoder decoder = new Pt3000ProtocolDecoder(new TestDataManager()); verify(decoder.decode(null, null, "%356939010012099,$GPRMC,124945.752,A,4436.6245,N,01054.4634,E,0.11,358.52,060408,,,A,+393334347445,N028d")); diff --git a/test/org/traccar/protocol/Pt502ProtocolDecoderTest.java b/test/org/traccar/protocol/Pt502ProtocolDecoderTest.java index d286dde77..0bcd8c3cd 100644 --- a/test/org/traccar/protocol/Pt502ProtocolDecoderTest.java +++ b/test/org/traccar/protocol/Pt502ProtocolDecoderTest.java @@ -9,8 +9,7 @@ public class Pt502ProtocolDecoderTest { @Test public void testDecode() throws Exception { - Pt502ProtocolDecoder decoder = new Pt502ProtocolDecoder(null); - decoder.setDataManager(new TestDataManager()); + Pt502ProtocolDecoder decoder = new Pt502ProtocolDecoder(new TestDataManager()); verify(decoder.decode(null, null, "$POS,6094,205523.000,A,1013.6223,N,06728.4248,W,0.0,99.3,011112,,,A/00000,00000/0/23895000//")); diff --git a/test/org/traccar/protocol/RitiProtocolDecoderTest.java b/test/org/traccar/protocol/RitiProtocolDecoderTest.java index 2f77a4fc1..06747ae45 100644 --- a/test/org/traccar/protocol/RitiProtocolDecoderTest.java +++ b/test/org/traccar/protocol/RitiProtocolDecoderTest.java @@ -13,8 +13,7 @@ public class RitiProtocolDecoderTest { @Test public void testDecode() throws Exception { - RitiProtocolDecoder decoder = new RitiProtocolDecoder(null); - decoder.setDataManager(new TestDataManager()); + RitiProtocolDecoder decoder = new RitiProtocolDecoder(new TestDataManager()); verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ByteOrder.LITTLE_ENDIAN, ChannelBufferTools.convertArray( new int[] {0x3b,0x28,0x64,0xa3,0x05,0x63,0x00,0x00,0x6d,0x40,0x00,0x00,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x24,0x47,0x50,0x52,0x4d,0x43,0x2c,0x32,0x31,0x31,0x37,0x34,0x33,0x2e,0x30,0x30,0x30,0x2c,0x41,0x2c,0x31,0x33,0x35,0x37,0x2e,0x33,0x36,0x37,0x35,0x2c,0x4e,0x2c,0x31,0x30,0x30,0x33,0x36,0x2e,0x36,0x39,0x39,0x32,0x2c,0x45,0x2c,0x30,0x2e,0x30,0x30,0x2c,0x2c,0x30,0x31,0x30,0x39,0x31,0x34,0x2c,0x2c,0x2c,0x41,0x2a,0x37,0x38,0x0d,0x0a,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x04,0x04})))); diff --git a/test/org/traccar/protocol/RuptelaProtocolDecoderTest.java b/test/org/traccar/protocol/RuptelaProtocolDecoderTest.java index ddca66aa0..a3bf225db 100644 --- a/test/org/traccar/protocol/RuptelaProtocolDecoderTest.java +++ b/test/org/traccar/protocol/RuptelaProtocolDecoderTest.java @@ -11,8 +11,7 @@ public class RuptelaProtocolDecoderTest { @Test public void testDecode() throws Exception { - RuptelaProtocolDecoder decoder = new RuptelaProtocolDecoder(null); - decoder.setDataManager(new TestDataManager()); + RuptelaProtocolDecoder decoder = new RuptelaProtocolDecoder(new TestDataManager()); int[] buf1 = {0x00,0x79,0x00,0x00,0x0b,0x1a,0x2a,0x55,0x85,0xc3,0x01,0x00,0x02,0x4e,0x9c,0x03,0x69,0x00,0x00,0x0f,0x10,0x17,0x33,0x20,0x8f,0xf4,0x5e,0x07,0xb3,0x1b,0x57,0x0a,0x00,0x10,0x09,0x09,0x06,0x05,0x01,0x1b,0x1a,0x02,0x00,0x03,0x00,0x1c,0x01,0xad,0x01,0x02,0x1d,0x33,0x8e,0x16,0x00,0x00,0x02,0x96,0x00,0x00,0x60,0x1a,0x41,0x01,0x4b,0xc1,0x6d,0x00,0x4e,0x9c,0x03,0x84,0x00,0x00,0x0f,0x10,0x4f,0xdf,0x20,0x90,0x0d,0x20,0x07,0x51,0x03,0xb0,0x0a,0x00,0x13 ,0x08,0x09,0x06,0x05,0x01,0x1b,0x1a,0x02,0x00,0x03,0x00,0x1c,0x01,0xad,0x01,0x02,0x1d,0x33,0xb1,0x16,0x00,0x00,0x02,0x96,0x00,0x00,0x60,0x1a,0x41,0x01,0x4b,0xc1,0xea,0x00,0x28,0xf9}; verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertArray(buf1)))); diff --git a/test/org/traccar/protocol/SanavProtocolDecoderTest.java b/test/org/traccar/protocol/SanavProtocolDecoderTest.java index d6d06edaa..b1a832f0f 100644 --- a/test/org/traccar/protocol/SanavProtocolDecoderTest.java +++ b/test/org/traccar/protocol/SanavProtocolDecoderTest.java @@ -9,8 +9,7 @@ public class SanavProtocolDecoderTest { @Test public void testDecode() throws Exception { - SanavProtocolDecoder decoder = new SanavProtocolDecoder(null); - decoder.setDataManager(new TestDataManager()); + SanavProtocolDecoder decoder = new SanavProtocolDecoder(new TestDataManager()); verify(decoder.decode(null, null, "imei=352024028982787&rmc=$GPRMC,103048.000,A,4735.0399,N,01905.2895,E,0.00,0.00,171013,,*05,AUTO-4095mv")); diff --git a/test/org/traccar/protocol/SkypatrolProtocolDecoderTest.java b/test/org/traccar/protocol/SkypatrolProtocolDecoderTest.java index a2bf3c0ab..a1ad836e6 100644 --- a/test/org/traccar/protocol/SkypatrolProtocolDecoderTest.java +++ b/test/org/traccar/protocol/SkypatrolProtocolDecoderTest.java @@ -11,8 +11,7 @@ public class SkypatrolProtocolDecoderTest { @Test public void testDecode() throws Exception { - SkypatrolProtocolDecoder decoder = new SkypatrolProtocolDecoder(null); - decoder.setDataManager(new TestDataManager()); + SkypatrolProtocolDecoder decoder = new SkypatrolProtocolDecoder(new TestDataManager()); verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertArray( new int[]{0x00,0x05,0x02,0x10,0x04,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x0D,0x31,0x31,0x34,0x37,0x37,0x35,0x38,0x33,0x00,0xCB,0x00,0x00,0x00,0x00,0x0E,0x11,0x07,0x0C,0x01,0x01,0x84,0xD0,0x32,0xFB,0x38,0x41,0x37,0x00,0x00,0x00,0x00,0x16,0x07,0x2B,0x00,0x00,0x17,0x05,0x00,0x32,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x4E,0x0C,0x07,0x11,0x16,0x07,0x2C,0x10,0x59,0x00,0x05,0x00,0x00,0x00,0x00,0x00,0x05,0x00,0x00,0x00,0x00,0x00,0x05,0x00,0x00,0x00,0x00,0x03,0x10,0x02,0x60,0xB7,0x36,0x3B,0x63,0x06,0xC1,0x1A,0x00,0xB7,0x36,0x37,0xF2,0x06,0xBF,0x19,0xB7,0x36,0x37,0xF1,0x06,0xB5,0x0E,0xB7,0x36,0x38,0xB1,0x06,0xBB,0x0B,0xB7,0x36,0x3B,0x61,0x06,0xB8,0x0A,0xB7,0x36,0x37,0xF3,0x06,0xB7,0x09,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0C})))); diff --git a/test/org/traccar/protocol/Stl060ProtocolDecoderTest.java b/test/org/traccar/protocol/Stl060ProtocolDecoderTest.java index 890de4f2d..2cee77ca4 100644 --- a/test/org/traccar/protocol/Stl060ProtocolDecoderTest.java +++ b/test/org/traccar/protocol/Stl060ProtocolDecoderTest.java @@ -9,8 +9,7 @@ public class Stl060ProtocolDecoderTest { @Test public void testDecode() throws Exception { - Stl060ProtocolDecoder decoder = new Stl060ProtocolDecoder(null); - decoder.setDataManager(new TestDataManager()); + Stl060ProtocolDecoder decoder = new Stl060ProtocolDecoder(new TestDataManager()); verify(decoder.decode(null, null, "$1,357804048043099,D001,AP29AW0963,23/02/14,14:06:54,17248488N,078342226E,0.08,193.12,1,1,1,1,1,A")); diff --git a/test/org/traccar/protocol/SuntechProtocolDecoderTest.java b/test/org/traccar/protocol/SuntechProtocolDecoderTest.java index fae36ec64..3fbb05bb3 100644 --- a/test/org/traccar/protocol/SuntechProtocolDecoderTest.java +++ b/test/org/traccar/protocol/SuntechProtocolDecoderTest.java @@ -10,8 +10,7 @@ public class SuntechProtocolDecoderTest { @Test public void testDecode() throws Exception { - SuntechProtocolDecoder decoder = new SuntechProtocolDecoder(null); - decoder.setDataManager(new TestDataManager()); + SuntechProtocolDecoder decoder = new SuntechProtocolDecoder(new TestDataManager()); assertNull(decoder.decode(null, null, "SA200ALV;317652")); diff --git a/test/org/traccar/protocol/SyrusProtocolDecoderTest.java b/test/org/traccar/protocol/SyrusProtocolDecoderTest.java index 5fc2655bc..87e9c025b 100644 --- a/test/org/traccar/protocol/SyrusProtocolDecoderTest.java +++ b/test/org/traccar/protocol/SyrusProtocolDecoderTest.java @@ -10,8 +10,7 @@ public class SyrusProtocolDecoderTest { @Test public void testDecode() throws Exception { - SyrusProtocolDecoder decoder = new SyrusProtocolDecoder(null, false); - decoder.setDataManager(new TestDataManager()); + SyrusProtocolDecoder decoder = new SyrusProtocolDecoder(new TestDataManager(), false); assertNotNull(decoder.decode(null, null, ">RPV00000+3739438-1220384601512612;ID=1234;*7F")); diff --git a/test/org/traccar/protocol/T55ProtocolDecoderTest.java b/test/org/traccar/protocol/T55ProtocolDecoderTest.java index bf7cf9101..a06df0c2d 100644 --- a/test/org/traccar/protocol/T55ProtocolDecoderTest.java +++ b/test/org/traccar/protocol/T55ProtocolDecoderTest.java @@ -10,8 +10,7 @@ public class T55ProtocolDecoderTest { @Test public void testDecode() throws Exception { - T55ProtocolDecoder decoder = new T55ProtocolDecoder(null); - decoder.setDataManager(new TestDataManager()); + T55ProtocolDecoder decoder = new T55ProtocolDecoder(new TestDataManager()); assertNull(decoder.decode(null, null, "$GPFID,ID123456ABC")); diff --git a/test/org/traccar/protocol/TelikProtocolDecoderTest.java b/test/org/traccar/protocol/TelikProtocolDecoderTest.java index 41b6f3a9d..257414abf 100644 --- a/test/org/traccar/protocol/TelikProtocolDecoderTest.java +++ b/test/org/traccar/protocol/TelikProtocolDecoderTest.java @@ -10,8 +10,7 @@ public class TelikProtocolDecoderTest { @Test public void testDecode() throws Exception { - TelikProtocolDecoder decoder = new TelikProtocolDecoder(null); - decoder.setDataManager(new TestDataManager()); + TelikProtocolDecoder decoder = new TelikProtocolDecoder(new TestDataManager()); assertNull(decoder.decode(null, null, "0026436729|232|01|003002030")); diff --git a/test/org/traccar/protocol/TeltonikaProtocolDecoderTest.java b/test/org/traccar/protocol/TeltonikaProtocolDecoderTest.java index 1cd265cb4..8f4b987df 100644 --- a/test/org/traccar/protocol/TeltonikaProtocolDecoderTest.java +++ b/test/org/traccar/protocol/TeltonikaProtocolDecoderTest.java @@ -12,8 +12,7 @@ public class TeltonikaProtocolDecoderTest { @Test public void testDecode() throws Exception { - TeltonikaProtocolDecoder decoder = new TeltonikaProtocolDecoder(null); - decoder.setDataManager(new TestDataManager()); + TeltonikaProtocolDecoder decoder = new TeltonikaProtocolDecoder(new TestDataManager()); assertNull(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertArray( new int[] {0x00,0x0F,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x30,0x31,0x32,0x33,0x34,0x35})))); diff --git a/test/org/traccar/protocol/Tk102ProtocolDecoderTest.java b/test/org/traccar/protocol/Tk102ProtocolDecoderTest.java index eeb97d18f..eb852875f 100644 --- a/test/org/traccar/protocol/Tk102ProtocolDecoderTest.java +++ b/test/org/traccar/protocol/Tk102ProtocolDecoderTest.java @@ -10,8 +10,7 @@ public class Tk102ProtocolDecoderTest { @Test public void testDecode() throws Exception { - Tk102ProtocolDecoder decoder = new Tk102ProtocolDecoder(null); - decoder.setDataManager(new TestDataManager()); + Tk102ProtocolDecoder decoder = new Tk102ProtocolDecoder(new TestDataManager()); assertNull(decoder.decode(null, null, "")); diff --git a/test/org/traccar/protocol/Tk103ProtocolDecoderTest.java b/test/org/traccar/protocol/Tk103ProtocolDecoderTest.java index 21066bdb2..6d6683db2 100644 --- a/test/org/traccar/protocol/Tk103ProtocolDecoderTest.java +++ b/test/org/traccar/protocol/Tk103ProtocolDecoderTest.java @@ -10,8 +10,7 @@ public class Tk103ProtocolDecoderTest { @Test public void testDecode() throws Exception { - Tk103ProtocolDecoder decoder = new Tk103ProtocolDecoder(null); - decoder.setDataManager(new TestDataManager()); + Tk103ProtocolDecoder decoder = new Tk103ProtocolDecoder(new TestDataManager()); assertNull(decoder.decode(null, null, "(090411121854BP0000001234567890HSO")); diff --git a/test/org/traccar/protocol/Tlt2hProtocolDecoderTest.java b/test/org/traccar/protocol/Tlt2hProtocolDecoderTest.java index 350df23b4..8ce438c4f 100644 --- a/test/org/traccar/protocol/Tlt2hProtocolDecoderTest.java +++ b/test/org/traccar/protocol/Tlt2hProtocolDecoderTest.java @@ -9,8 +9,7 @@ public class Tlt2hProtocolDecoderTest { @Test public void testDecode() throws Exception { - Tlt2hProtocolDecoder decoder = new Tlt2hProtocolDecoder(null); - decoder.setDataManager(new TestDataManager()); + Tlt2hProtocolDecoder decoder = new Tlt2hProtocolDecoder(new TestDataManager()); verify(decoder.decode(null, null, "#357671030946351#V500#0000#AUTO#1\r\n" + diff --git a/test/org/traccar/protocol/TopflytechProtocolDecoderTest.java b/test/org/traccar/protocol/TopflytechProtocolDecoderTest.java index 03c10dda6..3f84165bf 100644 --- a/test/org/traccar/protocol/TopflytechProtocolDecoderTest.java +++ b/test/org/traccar/protocol/TopflytechProtocolDecoderTest.java @@ -10,8 +10,7 @@ public class TopflytechProtocolDecoderTest { @Test public void testDecode() throws Exception { - TopflytechProtocolDecoder decoder = new TopflytechProtocolDecoder(null); - decoder.setDataManager(new TestDataManager()); + TopflytechProtocolDecoder decoder = new TopflytechProtocolDecoder(new TestDataManager()); verify(decoder.decode(null, null, "(880316890094910BP00XG00b600000000L00074b54S00000000R0C0F0014000100f0130531152205A0706.1395S11024.0965E000.0251.25")); diff --git a/test/org/traccar/protocol/TotemProtocolDecoderTest.java b/test/org/traccar/protocol/TotemProtocolDecoderTest.java index 2260fc13a..adcfd89ca 100644 --- a/test/org/traccar/protocol/TotemProtocolDecoderTest.java +++ b/test/org/traccar/protocol/TotemProtocolDecoderTest.java @@ -10,8 +10,7 @@ public class TotemProtocolDecoderTest { @Test public void testDecode() throws Exception { - TotemProtocolDecoder decoder = new TotemProtocolDecoder(null); - decoder.setDataManager(new TestDataManager()); + TotemProtocolDecoder decoder = new TotemProtocolDecoder(new TestDataManager()); assertNull(decoder.decode(null, null, "$$BB862170017856731|AA$GPRMC,000000.00,V,0000.0000,N,00000.0000,E,000.0,000.0,000000,,,A*73|00.0|00.0|00.0|000000001000|20000000000000|13790000|00000000|00000000|00000000|0.0000|0007|8C23")); diff --git a/test/org/traccar/protocol/Tr20ProtocolDecoderTest.java b/test/org/traccar/protocol/Tr20ProtocolDecoderTest.java index b78f95fac..c1fb6b1d2 100644 --- a/test/org/traccar/protocol/Tr20ProtocolDecoderTest.java +++ b/test/org/traccar/protocol/Tr20ProtocolDecoderTest.java @@ -10,8 +10,7 @@ public class Tr20ProtocolDecoderTest { @Test public void testDecode() throws Exception { - Tr20ProtocolDecoder decoder = new Tr20ProtocolDecoder(null); - decoder.setDataManager(new TestDataManager()); + Tr20ProtocolDecoder decoder = new Tr20ProtocolDecoder(new TestDataManager()); assertNull(decoder.decode(null, null, "%%TRACKPRO01,1")); diff --git a/test/org/traccar/protocol/TrackboxProtocolDecoderTest.java b/test/org/traccar/protocol/TrackboxProtocolDecoderTest.java index 7319bb329..131f29a68 100644 --- a/test/org/traccar/protocol/TrackboxProtocolDecoderTest.java +++ b/test/org/traccar/protocol/TrackboxProtocolDecoderTest.java @@ -10,8 +10,7 @@ public class TrackboxProtocolDecoderTest { @Test public void testDecode() throws Exception { - TrackboxProtocolDecoder decoder = new TrackboxProtocolDecoder(null); - decoder.setDataManager(new TestDataManager()); + TrackboxProtocolDecoder decoder = new TrackboxProtocolDecoder(new TestDataManager()); assertNull(decoder.decode(null, null, "a=connect&v=11&i=111111111111111")); diff --git a/test/org/traccar/protocol/V680ProtocolDecoderTest.java b/test/org/traccar/protocol/V680ProtocolDecoderTest.java index 3f2f2d829..84463a1af 100644 --- a/test/org/traccar/protocol/V680ProtocolDecoderTest.java +++ b/test/org/traccar/protocol/V680ProtocolDecoderTest.java @@ -10,8 +10,7 @@ public class V680ProtocolDecoderTest { @Test public void testDecode() throws Exception { - V680ProtocolDecoder decoder = new V680ProtocolDecoder(null); - decoder.setDataManager(new TestDataManager()); + V680ProtocolDecoder decoder = new V680ProtocolDecoder(new TestDataManager()); assertNull(decoder.decode(null, null, "#353588102019155")); diff --git a/test/org/traccar/protocol/VisiontekProtocolDecoderTest.java b/test/org/traccar/protocol/VisiontekProtocolDecoderTest.java index eba888810..683d86c7b 100644 --- a/test/org/traccar/protocol/VisiontekProtocolDecoderTest.java +++ b/test/org/traccar/protocol/VisiontekProtocolDecoderTest.java @@ -10,8 +10,7 @@ public class VisiontekProtocolDecoderTest { @Test public void testDecode() throws Exception { - VisiontekProtocolDecoder decoder = new VisiontekProtocolDecoder(null); - decoder.setDataManager(new TestDataManager()); + VisiontekProtocolDecoder decoder = new VisiontekProtocolDecoder(new TestDataManager()); verify(decoder.decode(null, null, "$1,AP09BU9397,861785006462448,20,06,14,15,03,28,17267339N,078279407E,060.0,073,0550,11,0,1,0,0,1,1,26,A,0000000000")); diff --git a/test/org/traccar/protocol/WialonProtocolDecoderTest.java b/test/org/traccar/protocol/WialonProtocolDecoderTest.java index a8a369bfc..89aca0d33 100644 --- a/test/org/traccar/protocol/WialonProtocolDecoderTest.java +++ b/test/org/traccar/protocol/WialonProtocolDecoderTest.java @@ -10,8 +10,7 @@ public class WialonProtocolDecoderTest { @Test public void testDecode() throws Exception { - WialonProtocolDecoder decoder = new WialonProtocolDecoder(null); - decoder.setDataManager(new TestDataManager()); + WialonProtocolDecoder decoder = new WialonProtocolDecoder(new TestDataManager()); assertNull(decoder.decode(null, null, "#L#123456789012345;test")); diff --git a/test/org/traccar/protocol/WondexProtocolDecoderTest.java b/test/org/traccar/protocol/WondexProtocolDecoderTest.java index eadd1d357..8f62a3b3a 100644 --- a/test/org/traccar/protocol/WondexProtocolDecoderTest.java +++ b/test/org/traccar/protocol/WondexProtocolDecoderTest.java @@ -9,8 +9,7 @@ public class WondexProtocolDecoderTest { @Test public void testDecode() throws Exception { - WondexProtocolDecoder decoder = new WondexProtocolDecoder(null); - decoder.setDataManager(new TestDataManager()); + WondexProtocolDecoder decoder = new WondexProtocolDecoder(new TestDataManager()); verify(decoder.decode(null, null, "1044989601,20130323074605,0.000000,90.000000,0,000,0,0,2")); diff --git a/test/org/traccar/protocol/Xexun2ProtocolDecoderTest.java b/test/org/traccar/protocol/Xexun2ProtocolDecoderTest.java index c3a257318..89907af64 100644 --- a/test/org/traccar/protocol/Xexun2ProtocolDecoderTest.java +++ b/test/org/traccar/protocol/Xexun2ProtocolDecoderTest.java @@ -9,8 +9,7 @@ public class Xexun2ProtocolDecoderTest { @Test public void testDecode() throws Exception { - Xexun2ProtocolDecoder decoder = new Xexun2ProtocolDecoder(null); - decoder.setDataManager(new TestDataManager()); + Xexun2ProtocolDecoder decoder = new Xexun2ProtocolDecoder(new TestDataManager()); verify(decoder.decode(null, null, "130302125349,+79604870506,GPRMC,085349.000,A,4503.2392,N,03858.5660,E,6.95,154.65,020313,,,A*6C,F,, imei:012207007744243,03,-1.5,F:4.15V,1,139,28048,250,01,278A,5072")); diff --git a/test/org/traccar/protocol/XexunProtocolDecoderTest.java b/test/org/traccar/protocol/XexunProtocolDecoderTest.java index 252293655..804a4687e 100644 --- a/test/org/traccar/protocol/XexunProtocolDecoderTest.java +++ b/test/org/traccar/protocol/XexunProtocolDecoderTest.java @@ -9,8 +9,7 @@ public class XexunProtocolDecoderTest { @Test public void testDecode() throws Exception { - XexunProtocolDecoder decoder = new XexunProtocolDecoder(null); - decoder.setDataManager(new TestDataManager()); + XexunProtocolDecoder decoder = new XexunProtocolDecoder(new TestDataManager()); verify(decoder.decode(null, null, "GPRMC,043435.000,A,811.299200,S,11339.9500,E,0.93,29.52,160313,00,0000.0,A*65,F,,imei:359585014597923,")); diff --git a/test/org/traccar/protocol/Xt7ProtocolDecoderTest.java b/test/org/traccar/protocol/Xt7ProtocolDecoderTest.java index 187221e3a..21a30d377 100644 --- a/test/org/traccar/protocol/Xt7ProtocolDecoderTest.java +++ b/test/org/traccar/protocol/Xt7ProtocolDecoderTest.java @@ -11,8 +11,7 @@ public class Xt7ProtocolDecoderTest { @Test public void testDecode() throws Exception { - Xt7ProtocolDecoder decoder = new Xt7ProtocolDecoder(null); - decoder.setDataManager(new TestDataManager()); + Xt7ProtocolDecoder decoder = new Xt7ProtocolDecoder(new TestDataManager()); ChannelBufferFactory factory = new HeapChannelBufferFactory(); byte[] buf1 = {0x53,0x54,0x58,0x32,0x30,0x31,0x30,0x31,0x30,0x31,0x38,0x30,0x31,0x20,0x20,0x20,0x20,0x20,0x20,0x02,0x6A,0x24,0x47,0x50,0x52,0x4D,0x43,0x2C,0x31,0x30,0x31,0x30,0x35,0x33,0x2E,0x30,0x30,0x30,0x2C,0x41,0x2C,0x32,0x32,0x33,0x32,0x2E,0x37,0x36,0x30,0x37,0x2C,0x4E,0x2C,0x31,0x31,0x34,0x30,0x34,0x2E,0x37,0x36,0x36,0x39,0x2C,0x45,0x2C,0x30,0x2E,0x30,0x30,0x2C,0x2C,0x32,0x33,0x31,0x31,0x31,0x30,0x2C,0x2C,0x2C,0x41,0x2A,0x37,0x46,0x2C,0x34,0x36,0x30,0x2C,0x30,0x30,0x2C,0x32,0x37,0x39,0x35,0x2C,0x30,0x45,0x36,0x41,0x2C,0x31,0x34,0x2C,0x39,0x34,0x2C,0x31,0x30,0x30,0x30,0x2C,0x30,0x30,0x30,0x30,0x2C,0x39,0x31,0x2C,0x54,0x69,0x6D,0x65,0x72,0x3B,0x31,0x44,0x0D,0x0A}; diff --git a/test/org/traccar/protocol/YwtProtocolDecoderTest.java b/test/org/traccar/protocol/YwtProtocolDecoderTest.java index 3f757c9d7..9ee8f0853 100644 --- a/test/org/traccar/protocol/YwtProtocolDecoderTest.java +++ b/test/org/traccar/protocol/YwtProtocolDecoderTest.java @@ -10,8 +10,7 @@ public class YwtProtocolDecoderTest { @Test public void testDecode() throws Exception { - YwtProtocolDecoder decoder = new YwtProtocolDecoder(null); - decoder.setDataManager(new TestDataManager()); + YwtProtocolDecoder decoder = new YwtProtocolDecoder(new TestDataManager()); assertNull(decoder.decode(null, null, "%SN,0417061042:0,0,140117041203,404")); |