diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2011-02-22 11:03:54 +0000 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2011-02-22 11:03:54 +0000 |
commit | 52c26cb593201a74443329221722cc33c142b476 (patch) | |
tree | c5ecf20cbc265a9147bf7bfcc856913565149dd6 /test/net/sourceforge/opentracking/protocol | |
parent | cdd6d038c5adca06db989a3b6fe8bd3fd36fe9ed (diff) | |
download | trackermap-server-52c26cb593201a74443329221722cc33c142b476.tar.gz trackermap-server-52c26cb593201a74443329221722cc33c142b476.tar.bz2 trackermap-server-52c26cb593201a74443329221722cc33c142b476.zip |
Diffstat (limited to 'test/net/sourceforge/opentracking/protocol')
-rw-r--r-- | test/net/sourceforge/opentracking/protocol/gps103/Gps103ProtocolDecoderTest.java | 10 | ||||
-rw-r--r-- | test/net/sourceforge/opentracking/protocol/xexun/XexunProtocolDecoderTest.java | 2 |
2 files changed, 11 insertions, 1 deletions
diff --git a/test/net/sourceforge/opentracking/protocol/gps103/Gps103ProtocolDecoderTest.java b/test/net/sourceforge/opentracking/protocol/gps103/Gps103ProtocolDecoderTest.java index 8d259a89f..3d1adcf34 100644 --- a/test/net/sourceforge/opentracking/protocol/gps103/Gps103ProtocolDecoderTest.java +++ b/test/net/sourceforge/opentracking/protocol/gps103/Gps103ProtocolDecoderTest.java @@ -1,6 +1,7 @@ package net.sourceforge.opentracking.protocol.gps103; -import java.util.Date; +import java.util.Calendar; +import java.util.TimeZone; import java.util.GregorianCalendar; import java.util.List; import org.junit.Test; @@ -30,6 +31,13 @@ public class Gps103ProtocolDecoderTest { @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 = "##,imei:10000000000000,A"; // NEW MESSAGE: imei:359587017470280,tracker,0000000000,03184511405,L,; diff --git a/test/net/sourceforge/opentracking/protocol/xexun/XexunProtocolDecoderTest.java b/test/net/sourceforge/opentracking/protocol/xexun/XexunProtocolDecoderTest.java index 9adbc2c31..23ef128ec 100644 --- a/test/net/sourceforge/opentracking/protocol/xexun/XexunProtocolDecoderTest.java +++ b/test/net/sourceforge/opentracking/protocol/xexun/XexunProtocolDecoderTest.java @@ -33,6 +33,8 @@ public class XexunProtocolDecoderTest { String testMsg = "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,"; XexunProtocolDecoder decoder = new XexunProtocolDecoder(new TestDataManager()); Position position = (Position) decoder.decode(null, null, testMsg); |