aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2011-09-05 08:07:43 +0000
committerAnton Tananaev <anton.tananaev@gmail.com>2011-09-05 08:07:43 +0000
commit68d855d0f3c7fa09003c8ae497060831c7bdce7f (patch)
tree6ca413488db8c2697550b66dc89ddb0beff7ae56 /test
parent39e60fdb4c4427d73881e4dc692c87b135582a8e (diff)
downloadtraccar-server-68d855d0f3c7fa09003c8ae497060831c7bdce7f.tar.gz
traccar-server-68d855d0f3c7fa09003c8ae497060831c7bdce7f.tar.bz2
traccar-server-68d855d0f3c7fa09003c8ae497060831c7bdce7f.zip
Diffstat (limited to 'test')
-rw-r--r--test/net/sourceforge/opentracking/protocol/gl200/Gl200ProtocolDecoderTest.java21
-rw-r--r--test/net/sourceforge/opentracking/protocol/xexun/XexunProtocolDecoderTest.java6
2 files changed, 8 insertions, 19 deletions
diff --git a/test/net/sourceforge/opentracking/protocol/gl200/Gl200ProtocolDecoderTest.java b/test/net/sourceforge/opentracking/protocol/gl200/Gl200ProtocolDecoderTest.java
index 9b6508523..09d7b0b35 100644
--- a/test/net/sourceforge/opentracking/protocol/gl200/Gl200ProtocolDecoderTest.java
+++ b/test/net/sourceforge/opentracking/protocol/gl200/Gl200ProtocolDecoderTest.java
@@ -31,23 +31,10 @@ public class Gl200ProtocolDecoderTest {
@Test
public void testDecode() throws Exception {
- /*Calendar time = new GregorianCalendar(TimeZone.getTimeZone("UTC"));
- time.set(Calendar.HOUR, 0);
- time.set(Calendar.MINUTE, 1);
- time.set(Calendar.SECOND, 2);
- time.set(Calendar.MILLISECOND, 3);
- String x = time.getTime().toString();
+ String testMsg1 = "+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";
- String testMsg1 = "##,imei:10000000000000,A";
- // NEW MESSAGE: imei:359587017470280,tracker,0000000000,03184511405,L,;
-
- String testMsg2 = //"imei:10000000000000,help me,1004171910,,F,010203.000,A,0102.0003,N,00102.0003,E,1.02,";
- //"imei:353451040164707,tracker,1105182344,+36304665439,F,214418.000,A,4804.2222,N,01916.7593,E,0.37,";
- "imei:353451042861763,tracker,1106132241,,F,144114.000,A,2301.9052,S,04909.3676,W,0.13,";
-
- Gps103ProtocolDecoder decoder = new Gps103ProtocolDecoder(new TestDataManager(), 0);
- //assertNull(decoder.decode(null, null, testMsg1));
- Position position = (Position) decoder.decode(null, null, testMsg2);
+ Gl200ProtocolDecoder decoder = new Gl200ProtocolDecoder(new TestDataManager(), 0);
+ Position position = (Position) decoder.decode(null, null, testMsg1);
//Date time = new GregorianCalendar(2003, 1, 1, 1, 2, 3).getTime();
//assertEquals(time, position.getTime());
@@ -64,7 +51,7 @@ public class Gl200ProtocolDecoderTest {
assertEquals(speed, position.getSpeed());
Long deviceId = new Long(1);
- assertEquals(deviceId, position.getDeviceId());*/
+ assertEquals(deviceId, position.getDeviceId());
}
}
diff --git a/test/net/sourceforge/opentracking/protocol/xexun/XexunProtocolDecoderTest.java b/test/net/sourceforge/opentracking/protocol/xexun/XexunProtocolDecoderTest.java
index 2d0653bb2..77b6b4a81 100644
--- a/test/net/sourceforge/opentracking/protocol/xexun/XexunProtocolDecoderTest.java
+++ b/test/net/sourceforge/opentracking/protocol/xexun/XexunProtocolDecoderTest.java
@@ -31,8 +31,10 @@ public class XexunProtocolDecoderTest {
public void testDecode() throws Exception {
String testMsg =
- "GPRMC,010203.000,A,0102.0003,N,00102.0003,E,1.02,1.02,010203,,,A*00,F,, " +
- "imei:10000000000000,";
+ "GPRMC,150120.000,A,3346.4463,S,15057.3083,E,0.0,117.4,010911,,,A*76,F," +
+ "imei:351525010943661,";
+ //"GPRMC,010203.000,A,0102.0003,N,00102.0003,E,1.02,1.02,010203,,,A*00,F,, " +
+ //"imei:10000000000000,";
//"GPRMC,233842.000,A,5001.3060,N,01429.3243,E,0.00,,210211,,,A*74,F," +
//"imei:354776030495631,";
//1103100803,+79629503178,