aboutsummaryrefslogtreecommitdiff
path: root/test/org
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2013-08-16 22:42:40 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2013-08-16 22:42:40 +1200
commit8cf628f7c70d12aeb3f54ad5363114e045863f2e (patch)
tree82d1b833d2890c6b4b186aaad5116e8e86e6a62d /test/org
parent123544ebec47b6d418980ff2da6033de1fe0ea45 (diff)
downloadtrackermap-server-8cf628f7c70d12aeb3f54ad5363114e045863f2e.tar.gz
trackermap-server-8cf628f7c70d12aeb3f54ad5363114e045863f2e.tar.bz2
trackermap-server-8cf628f7c70d12aeb3f54ad5363114e045863f2e.zip
Added Totem protocol (fix #355)
Diffstat (limited to 'test/org')
-rw-r--r--test/org/traccar/protocol/TotemProtocolDecoderTest.java25
1 files changed, 25 insertions, 0 deletions
diff --git a/test/org/traccar/protocol/TotemProtocolDecoderTest.java b/test/org/traccar/protocol/TotemProtocolDecoderTest.java
new file mode 100644
index 000000000..9e415592b
--- /dev/null
+++ b/test/org/traccar/protocol/TotemProtocolDecoderTest.java
@@ -0,0 +1,25 @@
+package org.traccar.protocol;
+
+import static org.junit.Assert.assertNotNull;
+import org.junit.Test;
+
+public class TotemProtocolDecoderTest {
+
+ @Test
+ public void testDecode() throws Exception {
+
+ TotemProtocolDecoder decoder = new TotemProtocolDecoder(null);
+ decoder.setDataManager(new TestDataManager());
+
+ assertNotNull(decoder.decode(null, null,
+ "$$BB862170017856731|AA$GPRMC,000000.00,V,0000.0000,N,00000.0000,E,000.0,000.0,000000,,,A*73|00.0|00.0|00.0|000000001000|20000000000000|13790000|00000000|00000000|00000000|0.0000|0007|8C23"));
+
+ assertNotNull(decoder.decode(null, null,
+ "$$B2359772032984289|AA$GPRMC,104446.000,A,5011.3944,N,01439.6637,E,0.00,,290212,,,A*7D|01.8|00.9|01.5|000000100000|20120229104446|14151221|00050000|046D085E|0000|0.0000|1170|29A7"));
+
+ assertNotNull(decoder.decode(null, null,
+ "$$8B862170017861566|AA180613080657|A|2237.1901|N|11402.1369|E|1.579|178|8.70|100000001000|13811|00000000|253162F5|00000000|0.0000|0014|2B16"));
+
+ }
+
+}