aboutsummaryrefslogtreecommitdiff
path: root/test/org
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2016-03-14 14:24:41 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2016-03-14 14:24:41 +1300
commit40bf728938311fa9619ad2bb0eb89b21c16e9585 (patch)
tree1b67d0e7c9e526db20281e4cc126248232d83c59 /test/org
parent655d7cba4a63db2058d08f04fe5a7cdcb4067017 (diff)
downloadtraccar-server-40bf728938311fa9619ad2bb0eb89b21c16e9585.tar.gz
traccar-server-40bf728938311fa9619ad2bb0eb89b21c16e9585.tar.bz2
traccar-server-40bf728938311fa9619ad2bb0eb89b21c16e9585.zip
Implement Fox Lite protocol
Diffstat (limited to 'test/org')
-rw-r--r--test/org/traccar/protocol/FoxProtocolDecoderTest.java27
1 files changed, 27 insertions, 0 deletions
diff --git a/test/org/traccar/protocol/FoxProtocolDecoderTest.java b/test/org/traccar/protocol/FoxProtocolDecoderTest.java
new file mode 100644
index 000000000..304db1891
--- /dev/null
+++ b/test/org/traccar/protocol/FoxProtocolDecoderTest.java
@@ -0,0 +1,27 @@
+package org.traccar.protocol;
+
+import org.junit.Test;
+import org.traccar.ProtocolTest;
+
+public class FoxProtocolDecoderTest extends ProtocolTest {
+
+ @Test
+ public void testDecode() throws Exception {
+
+ FoxProtocolDecoder decoder = new FoxProtocolDecoder(new FoxProtocol());
+
+ verifyPosition(decoder, text(
+ "<fox><gps id=\"90\" data=\"1092,V,010101,000004,0000.0000,N,00000.0000,E,0,0,,1111111111111111 123 0 0 0 0 0 00000000 47664,47664\"/></fox>"));
+
+ verifyPosition(decoder, text(
+ "<fox><gps id=\"90\" data=\"31,V,110316,125952,0000.0000,N,00000.0000,E,0,0,,1111111111111111 123 0 0 0 0 0 00000000 47664,65 60 60 60 60 60 60 60 65 65 55 55 60 60 60 60 60 60 60 60 55 55 60 55 65 60 60 60 60 60 60 55\"/></fox>"));
+
+ verifyPosition(decoder, text(
+ "<fox><gps id=\"90\" data=\"0,V,110316,130154,0000.0000,N,00000.0000,E,0,0,,1111111111111111 123 0 0 0 0 0 00000000 47664,47664 0\"/></fox>"));
+
+ verifyPosition(decoder, text(
+ "<fox><gps id=\"90\" data=\"0,A,110316,131834,4448.8355,N,02028.2021,E,0,217,,1111111111111111 123 0 0 0 0 0 00000000 50020,50020 0\"/></fox>"));
+
+ }
+
+}