aboutsummaryrefslogtreecommitdiff
path: root/test/org/traccar
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2013-02-08 19:49:56 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2013-02-08 19:49:56 +1300
commitab72e6b1295f4f86ee2873c039f35f7c2da70395 (patch)
tree73e8a33391c24410e02660c12fd5ac78d5dc37dc /test/org/traccar
parent60c92c0c3efa2fdd7133bb9c0488b614a0409f5f (diff)
downloadtrackermap-server-ab72e6b1295f4f86ee2873c039f35f7c2da70395.tar.gz
trackermap-server-ab72e6b1295f4f86ee2873c039f35f7c2da70395.tar.bz2
trackermap-server-ab72e6b1295f4f86ee2873c039f35f7c2da70395.zip
Added GpsGate protocol (fix #138)
Diffstat (limited to 'test/org/traccar')
-rw-r--r--test/org/traccar/protocol/GpsGateProtocolDecoderTest.java24
1 files changed, 24 insertions, 0 deletions
diff --git a/test/org/traccar/protocol/GpsGateProtocolDecoderTest.java b/test/org/traccar/protocol/GpsGateProtocolDecoderTest.java
new file mode 100644
index 000000000..4f30d1224
--- /dev/null
+++ b/test/org/traccar/protocol/GpsGateProtocolDecoderTest.java
@@ -0,0 +1,24 @@
+package org.traccar.protocol;
+
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import org.junit.Test;
+
+public class GpsGateProtocolDecoderTest {
+
+ @Test
+ public void testDecode() throws Exception {
+
+ GpsGateProtocolDecoder decoder = new GpsGateProtocolDecoder(null);
+ decoder.setDataManager(new TestDataManager());
+
+ assertNull(decoder.decode(null, null, "$FRLIN,,user1,8IVHF*7A"));
+
+ assertNull(decoder.decode(null, null, "$FRLIN,IMEI,1234123412341234,*7B"));
+
+ assertNotNull(decoder.decode(null, null,
+ "$GPRMC,154403.000,A,6311.64120,N,01438.02740,E,0.000,0.0,270707,,*0A"));
+
+ }
+
+}