aboutsummaryrefslogtreecommitdiff
path: root/test/org/traccar/protocol
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2013-08-12 22:45:47 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2013-08-12 22:45:47 +1200
commitc42b05ceffcf56c696b20b34cacb80f7ce690497 (patch)
tree6b5c9a1c85638d20cc1ac395c6122b589fcafdea /test/org/traccar/protocol
parent2bd65faa3ca6e78727277c6daa1c97bf01689c8a (diff)
downloadtraccar-server-c42b05ceffcf56c696b20b34cacb80f7ce690497.tar.gz
traccar-server-c42b05ceffcf56c696b20b34cacb80f7ce690497.tar.bz2
traccar-server-c42b05ceffcf56c696b20b34cacb80f7ce690497.zip
Added Gotop protocol
Diffstat (limited to 'test/org/traccar/protocol')
-rw-r--r--test/org/traccar/protocol/GotopProtocolDecoderTest.java28
1 files changed, 28 insertions, 0 deletions
diff --git a/test/org/traccar/protocol/GotopProtocolDecoderTest.java b/test/org/traccar/protocol/GotopProtocolDecoderTest.java
new file mode 100644
index 000000000..64376a4bb
--- /dev/null
+++ b/test/org/traccar/protocol/GotopProtocolDecoderTest.java
@@ -0,0 +1,28 @@
+package org.traccar.protocol;
+
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import org.junit.Test;
+
+public class GotopProtocolDecoderTest {
+
+ @Test
+ public void testDecode() throws Exception {
+
+ GotopProtocolDecoder decoder = new GotopProtocolDecoder(null);
+ decoder.setDataManager(new TestDataManager());
+
+ assertNull(decoder.decode(null, null, ""));
+
+ assertNotNull(decoder.decode(null, null,
+ "013226009991924,CMD-T,A,DATE:130802,TIME:153721,LAT:25.9757433S,LOT:028.1087816E,Speed:000.0,X-X-X-X-81-26,000,65501-00A0-4B8E"));
+
+ assertNotNull(decoder.decode(null, null,
+ "353327020115804,CMD-T,A,DATE:090329,TIME:223252,LAT:22.7634066N,LOT:114.3964783E,Speed:000.0,84-20,000"));
+
+ assertNotNull(decoder.decode(null, null,
+ "353327020115804,CMD-T,A,DATE:090329,TIME:223252,LAT:22.7634066N,LOT:114.3964783E,Speed:000.0,1-1-0-84-20,000"));
+
+ }
+
+}