diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2011-09-05 08:07:43 +0000 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2011-09-05 08:07:43 +0000 |
commit | 68d855d0f3c7fa09003c8ae497060831c7bdce7f (patch) | |
tree | 6ca413488db8c2697550b66dc89ddb0beff7ae56 /test/net/sourceforge/opentracking/protocol/gl200 | |
parent | 39e60fdb4c4427d73881e4dc692c87b135582a8e (diff) | |
download | trackermap-server-68d855d0f3c7fa09003c8ae497060831c7bdce7f.tar.gz trackermap-server-68d855d0f3c7fa09003c8ae497060831c7bdce7f.tar.bz2 trackermap-server-68d855d0f3c7fa09003c8ae497060831c7bdce7f.zip |
Diffstat (limited to 'test/net/sourceforge/opentracking/protocol/gl200')
-rw-r--r-- | test/net/sourceforge/opentracking/protocol/gl200/Gl200ProtocolDecoderTest.java | 21 |
1 files changed, 4 insertions, 17 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()); } } |