diff options
Diffstat (limited to 'test/net/sourceforge')
5 files changed, 0 insertions, 228 deletions
diff --git a/test/net/sourceforge/opentracking/protocol/gl200/Gl200ProtocolDecoderTest.java b/test/net/sourceforge/opentracking/protocol/gl200/Gl200ProtocolDecoderTest.java deleted file mode 100644 index 53f1eebf8..000000000 --- a/test/net/sourceforge/opentracking/protocol/gl200/Gl200ProtocolDecoderTest.java +++ /dev/null @@ -1,41 +0,0 @@ -package net.sourceforge.opentracking.protocol.gl200; - -import java.util.Calendar; -import java.util.TimeZone; -import java.util.GregorianCalendar; -import java.util.List; -import org.junit.Test; -import net.sourceforge.opentracking.Device; -import net.sourceforge.opentracking.Position; -import net.sourceforge.opentracking.DataManager; -import static org.junit.Assert.*; - -public class Gl200ProtocolDecoderTest { - - private class TestDataManager implements DataManager { - public List getDevices() { - return null; - } - - public Device getDeviceByImei(String imei) { - Device device = new Device(); - device.setId(new Long(1)); - device.setImei("10000000000000"); - return device; - } - - public void setPosition(Position position) { - } - } - - @Test - public void testDecode() throws Exception { - - Gl200ProtocolDecoder decoder = new Gl200ProtocolDecoder(new TestDataManager(), 0); - - assertNotNull(decoder.decode(null, null, - "+RESP:GTFRI,020102,000035988863964,,0,0,1,1,4.3,92,70.0,121.354335,31.222073,20090214013254,0460,0000,18d8,6141,00,,20090214093254,11F0")); - - } - -} diff --git a/test/net/sourceforge/opentracking/protocol/gps103/Gps103ProtocolDecoderTest.java b/test/net/sourceforge/opentracking/protocol/gps103/Gps103ProtocolDecoderTest.java deleted file mode 100644 index 18fde11a7..000000000 --- a/test/net/sourceforge/opentracking/protocol/gps103/Gps103ProtocolDecoderTest.java +++ /dev/null @@ -1,52 +0,0 @@ -package net.sourceforge.opentracking.protocol.gps103; - -import java.util.Calendar; -import java.util.TimeZone; -import java.util.GregorianCalendar; -import java.util.List; -import org.junit.Test; -import net.sourceforge.opentracking.Device; -import net.sourceforge.opentracking.Position; -import net.sourceforge.opentracking.DataManager; -import static org.junit.Assert.*; - -public class Gps103ProtocolDecoderTest { - - private class TestDataManager implements DataManager { - public List getDevices() { - return null; - } - - public Device getDeviceByImei(String imei) { - Device device = new Device(); - device.setId(new Long(1)); - device.setImei("10000000000000"); - return device; - } - - public void setPosition(Position position) { - } - } - - @Test - public void testDecode() throws Exception { - - Gps103ProtocolDecoder decoder = new Gps103ProtocolDecoder(new TestDataManager(), 0); - - // assertNull(decoder.decode(null, null, "##,imei:10000000000000,A")); - - assertNotNull(decoder.decode(null, null, - "imei:10000000000000,help me,1004171910,,F,010203.000,A,0102.0003,N,00102.0003,E,1.02,")); - - assertNotNull(decoder.decode(null, null, - "imei:353451040164707,tracker,1105182344,+36304665439,F,214418.000,A,4804.2222,N,01916.7593,E,0.37,")); - - assertNotNull(decoder.decode(null, null, - "imei:353451042861763,tracker,1106132241,,F,144114.000,A,2301.9052,S,04909.3676,W,0.13,")); - - assertNotNull(decoder.decode(null, null, - "imei:359587010124900,tracker,0809231929,13554900601,F,112909.397,A,2234.4669,N,11354.3287,E,0.11,321.53,;")); - - } - -} diff --git a/test/net/sourceforge/opentracking/protocol/t55/T55ProtocolDecoderTest.java b/test/net/sourceforge/opentracking/protocol/t55/T55ProtocolDecoderTest.java deleted file mode 100644 index 009c94c5c..000000000 --- a/test/net/sourceforge/opentracking/protocol/t55/T55ProtocolDecoderTest.java +++ /dev/null @@ -1,45 +0,0 @@ -package net.sourceforge.opentracking.protocol.t55; - -import java.util.Date; -import java.util.GregorianCalendar; -import java.util.List; -import org.junit.Test; -import net.sourceforge.opentracking.Device; -import net.sourceforge.opentracking.Position; -import net.sourceforge.opentracking.DataManager; -import static org.junit.Assert.*; - -public class T55ProtocolDecoderTest { - - private class TestDataManager implements DataManager { - public List getDevices() { - return null; - } - - public Device getDeviceByImei(String imei) { - Device device = new Device(); - device.setId(new Long(1)); - device.setImei("10000000000000"); - return device; - } - - public void setPosition(Position position) { - } - } - - @Test - public void testDecode() throws Exception { - - T55ProtocolDecoder decoder = new T55ProtocolDecoder(new TestDataManager(), 0); - - assertNull(decoder.decode(null, null, "$PGID,359853000144328*0F")); - - assertNotNull(decoder.decode(null, null, - "$GPRMC,094907.000,A,6000.5332,N,03020.5192,E,1.17,60.26,091111,,*33")); - - assertNotNull(decoder.decode(null, null, - "$GPRMC,115528.000,A,6000.5432,N,03020.4948,E,,,091111,,*06")); - - } - -} diff --git a/test/net/sourceforge/opentracking/protocol/tk103/Tk103ProtocolDecoderTest.java b/test/net/sourceforge/opentracking/protocol/tk103/Tk103ProtocolDecoderTest.java deleted file mode 100644 index ba4a97e14..000000000 --- a/test/net/sourceforge/opentracking/protocol/tk103/Tk103ProtocolDecoderTest.java +++ /dev/null @@ -1,41 +0,0 @@ -package net.sourceforge.opentracking.protocol.tk103; - -import java.util.Calendar; -import java.util.TimeZone; -import java.util.GregorianCalendar; -import java.util.List; -import org.junit.Test; -import net.sourceforge.opentracking.Device; -import net.sourceforge.opentracking.Position; -import net.sourceforge.opentracking.DataManager; -import static org.junit.Assert.*; - -public class Tk103ProtocolDecoderTest { - - private class TestDataManager implements DataManager { - public List getDevices() { - return null; - } - - public Device getDeviceByImei(String imei) { - Device device = new Device(); - device.setId(new Long(1)); - device.setImei("10000000000000"); - return device; - } - - public void setPosition(Position position) { - } - } - - @Test - public void testDecode() throws Exception { - - Tk103ProtocolDecoder decoder = new Tk103ProtocolDecoder(new TestDataManager(), 0); - - assertNotNull(decoder.decode(null, null, - "(035988863964BP05000035988863964110524A4241.7977N02318.7561E000.0123536356.5100000000L000946BB")); - - } - -} diff --git a/test/net/sourceforge/opentracking/protocol/xexun/XexunProtocolDecoderTest.java b/test/net/sourceforge/opentracking/protocol/xexun/XexunProtocolDecoderTest.java deleted file mode 100644 index ba374a3ed..000000000 --- a/test/net/sourceforge/opentracking/protocol/xexun/XexunProtocolDecoderTest.java +++ /dev/null @@ -1,49 +0,0 @@ -package net.sourceforge.opentracking.protocol.xexun; - -import java.util.Date; -import java.util.GregorianCalendar; -import java.util.List; -import org.junit.Test; -import net.sourceforge.opentracking.Device; -import net.sourceforge.opentracking.Position; -import net.sourceforge.opentracking.DataManager; -import static org.junit.Assert.*; - -public class XexunProtocolDecoderTest { - - private class TestDataManager implements DataManager { - public List getDevices() { - return null; - } - - public Device getDeviceByImei(String imei) { - Device device = new Device(); - device.setId(new Long(1)); - device.setImei("10000000000000"); - return device; - } - - public void setPosition(Position position) { - } - } - - @Test - public void testDecode() throws Exception { - - XexunProtocolDecoder decoder = new XexunProtocolDecoder(new TestDataManager(), 0); - - assertNotNull(decoder.decode(null, null, - "GPRMC,150120.000,A,3346.4463,S,15057.3083,E,0.0,117.4,010911,,,A*76,F,imei:351525010943661,")); - - assertNotNull(decoder.decode(null, null, - "GPRMC,010203.000,A,0102.0003,N,00102.0003,E,1.02,1.02,010203,,,A*00,F,,imei:10000000000000,")); - - assertNotNull(decoder.decode(null, null, - "GPRMC,233842.000,A,5001.3060,N,01429.3243,E,0.00,,210211,,,A*74,F,imei:354776030495631,")); - - assertNotNull(decoder.decode(null, null, - "GPRMC,080303.000,A,5546.7313,N,03738.6005,E,0.56,160.13,100311,,,A*6A,L,imei:354778030461167,")); - - } - -} |