aboutsummaryrefslogtreecommitdiff
path: root/test/org
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2013-11-03 11:56:19 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2013-11-03 11:56:19 +1300
commit27b76e26e7f438976e6702c9f3c71be93f68fa52 (patch)
tree31eff062934a199e644c613894410a276d98cbc9 /test/org
parent4eee2d3db43dd7154e0de499b89be90c8f59a383 (diff)
downloadtrackermap-server-27b76e26e7f438976e6702c9f3c71be93f68fa52.tar.gz
trackermap-server-27b76e26e7f438976e6702c9f3c71be93f68fa52.tar.bz2
trackermap-server-27b76e26e7f438976e6702c9f3c71be93f68fa52.zip
Merge AVL08 and Totem protocols
Diffstat (limited to 'test/org')
-rw-r--r--test/org/traccar/protocol/Avl08ProtocolDecoderTest.java46
-rw-r--r--test/org/traccar/protocol/TotemProtocolDecoderTest.java30
2 files changed, 30 insertions, 46 deletions
diff --git a/test/org/traccar/protocol/Avl08ProtocolDecoderTest.java b/test/org/traccar/protocol/Avl08ProtocolDecoderTest.java
deleted file mode 100644
index 802b3f949..000000000
--- a/test/org/traccar/protocol/Avl08ProtocolDecoderTest.java
+++ /dev/null
@@ -1,46 +0,0 @@
-package org.traccar.protocol;
-
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
-import org.junit.Test;
-
-public class Avl08ProtocolDecoderTest {
-
- @Test
- public void testDecode() throws Exception {
-
- Avl08ProtocolDecoder decoder = new Avl08ProtocolDecoder(null);
- decoder.setDataManager(new TestDataManager());
-
- assertNotNull(decoder.decode(null, null,
- "$$B0456123|61$GPRMC,114725.00,A,1258.68276,N,07730.60237,E,0.410,,080113,,,A*79|1.44|0.66|1.27|000000000000|20130108114425|03600000|00000000|053C2BFE|0000|0.3325|0063|2005"));
-
- assertNull(decoder.decode(null, null,
- "$$AE359772033395899|AA000000000000000000000000000000000000000000000000000000000000|00.0|00.0|00.0|000000000000|20090215000153|13601435|00000000|00000000|0000|0.0000|0007|2DAA"));
-
- assertNull(decoder.decode(null, null,
- "$$AE359772033395899|AA000000000000000000000000000000000000000000000000000000000000|00.0|00.0|00.0|00000000|20090215001204|14182037|00000000|0012D888|0000|0.0000|0016|5B51"));
-
- assertNull(decoder.decode(null, null,
- "$$AE359772033395899|AA00000000000000000000000000000000000000000000000000000000000|00.0|00.0|00.0|00000000000|20090215001337|14182013|00000000|0012D888|0000|0.0000|0017|346E"));
-
- assertNotNull(decoder.decode(null, null,
- "$$B3359772032399074|60$GPRMC,094859.000,A,3648.2229,N,01008.0976,E,0.00,,221211,,,A*79|02.3|01.3|02.0|000000000000|20111222094858|13360808|00000000|00000000|0000|0.0000|0001||A977"));
-
- assertNotNull(decoder.decode(null, null,
- "$$B3359772032399074|09$GPRMC,094905.000,A,3648.2229,N,01008.0976,E,0.00,,221211,,,A*71|02.1|01.3|01.7|000000000000|20111222094905|03210533|00000000|00000000|0000|0.0000|0002||FA58"));
-
- assertNotNull(decoder.decode(null, null,
- "$$B3359772032399074|AA$GPRMC,093911.000,A,3648.2146,N,01008.0977,E,0.00,,140312,,,A*7E|02.1|01.1|01.8|000000000000|20120314093910|04100057|00000000|0012D887|0000|0.0000|1128||C50E"));
-
- assertNotNull(decoder.decode(null, null,
- "$$B3359772032399074|AA$GPRMC,094258.000,A,3648.2146,N,01008.0977,E,0.00,,140312,,,A*7F|02.1|01.1|01.8|000000000000|20120314094257|04120057|00000000|0012D887|0000|0.0000|1136||CA32"));
-
- assertNotNull(decoder.decode(null, null,
- "$$B3359772032399074|AA$GPRMC,234603.000,A,3648.2179,N,01008.0962,E,0.00,,030412,,,A*74|01.8|01.0|01.5|000000000000|20120403234603|14251914|00000000|0012D888|0000|0.0000|3674||940B"));
-
- assertNotNull(decoder.decode(null, null,
- "$$B3359772032399074|AA$GPRMC,234603.000,A,3648.2179,N,01008.0962,E,0.00,,030412,,,A*74|01.8|01.0|01.5|000000000000|20120403234603|14251914|00000000|0012D888|0000|0.0000|3674|940B"));
- }
-
-}
diff --git a/test/org/traccar/protocol/TotemProtocolDecoderTest.java b/test/org/traccar/protocol/TotemProtocolDecoderTest.java
index 9b5a1d349..7317af419 100644
--- a/test/org/traccar/protocol/TotemProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/TotemProtocolDecoderTest.java
@@ -27,6 +27,36 @@ public class TotemProtocolDecoderTest {
assertNotNull(decoder.decode(null, null,
"$$72862170017856731|3913090911165280000370000000000000000019BD508A0400000003.400000093644.9817N01012.9944E00506F2E"));
+ assertNotNull(decoder.decode(null, null,
+ "$$B0456123|61$GPRMC,114725.00,A,1258.68276,N,07730.60237,E,0.410,,080113,,,A*79|1.44|0.66|1.27|000000000000|20130108114425|03600000|00000000|053C2BFE|0000|0.3325|0063|2005"));
+
+ assertNull(decoder.decode(null, null,
+ "$$AE359772033395899|AA000000000000000000000000000000000000000000000000000000000000|00.0|00.0|00.0|000000000000|20090215000153|13601435|00000000|00000000|0000|0.0000|0007|2DAA"));
+
+ assertNull(decoder.decode(null, null,
+ "$$AE359772033395899|AA000000000000000000000000000000000000000000000000000000000000|00.0|00.0|00.0|00000000|20090215001204|14182037|00000000|0012D888|0000|0.0000|0016|5B51"));
+
+ assertNull(decoder.decode(null, null,
+ "$$AE359772033395899|AA00000000000000000000000000000000000000000000000000000000000|00.0|00.0|00.0|00000000000|20090215001337|14182013|00000000|0012D888|0000|0.0000|0017|346E"));
+
+ assertNotNull(decoder.decode(null, null,
+ "$$B3359772032399074|60$GPRMC,094859.000,A,3648.2229,N,01008.0976,E,0.00,,221211,,,A*79|02.3|01.3|02.0|000000000000|20111222094858|13360808|00000000|00000000|0000|0.0000|0001||A977"));
+
+ assertNotNull(decoder.decode(null, null,
+ "$$B3359772032399074|09$GPRMC,094905.000,A,3648.2229,N,01008.0976,E,0.00,,221211,,,A*71|02.1|01.3|01.7|000000000000|20111222094905|03210533|00000000|00000000|0000|0.0000|0002||FA58"));
+
+ assertNotNull(decoder.decode(null, null,
+ "$$B3359772032399074|AA$GPRMC,093911.000,A,3648.2146,N,01008.0977,E,0.00,,140312,,,A*7E|02.1|01.1|01.8|000000000000|20120314093910|04100057|00000000|0012D887|0000|0.0000|1128||C50E"));
+
+ assertNotNull(decoder.decode(null, null,
+ "$$B3359772032399074|AA$GPRMC,094258.000,A,3648.2146,N,01008.0977,E,0.00,,140312,,,A*7F|02.1|01.1|01.8|000000000000|20120314094257|04120057|00000000|0012D887|0000|0.0000|1136||CA32"));
+
+ assertNotNull(decoder.decode(null, null,
+ "$$B3359772032399074|AA$GPRMC,234603.000,A,3648.2179,N,01008.0962,E,0.00,,030412,,,A*74|01.8|01.0|01.5|000000000000|20120403234603|14251914|00000000|0012D888|0000|0.0000|3674||940B"));
+
+ assertNotNull(decoder.decode(null, null,
+ "$$B3359772032399074|AA$GPRMC,234603.000,A,3648.2179,N,01008.0962,E,0.00,,030412,,,A*74|01.8|01.0|01.5|000000000000|20120403234603|14251914|00000000|0012D888|0000|0.0000|3674|940B"));
+
}
}