aboutsummaryrefslogtreecommitdiff
path: root/test/org/traccar/protocol/Gps103ProtocolDecoderTest.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2012-04-26 19:34:10 +0000
committerAnton Tananaev <anton.tananaev@gmail.com>2012-04-26 19:34:10 +0000
commit02c1fb78a8b1681325ec01f49ae6ff6603825243 (patch)
treea851415301ec88a03d492594ba47577f02dc0edd /test/org/traccar/protocol/Gps103ProtocolDecoderTest.java
parentf0b1e58016632af5514d94b7439af77b9918b643 (diff)
downloadtrackermap-server-02c1fb78a8b1681325ec01f49ae6ff6603825243.tar.gz
trackermap-server-02c1fb78a8b1681325ec01f49ae6ff6603825243.tar.bz2
trackermap-server-02c1fb78a8b1681325ec01f49ae6ff6603825243.zip
Diffstat (limited to 'test/org/traccar/protocol/Gps103ProtocolDecoderTest.java')
-rw-r--r--test/org/traccar/protocol/Gps103ProtocolDecoderTest.java29
1 files changed, 29 insertions, 0 deletions
diff --git a/test/org/traccar/protocol/Gps103ProtocolDecoderTest.java b/test/org/traccar/protocol/Gps103ProtocolDecoderTest.java
new file mode 100644
index 000000000..c09b34bc7
--- /dev/null
+++ b/test/org/traccar/protocol/Gps103ProtocolDecoderTest.java
@@ -0,0 +1,29 @@
+package org.traccar.protocol;
+
+import static org.junit.Assert.assertNotNull;
+import org.junit.Test;
+
+public class Gps103ProtocolDecoderTest {
+
+ @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,"));
+
+ }
+
+}