aboutsummaryrefslogtreecommitdiff
path: root/test/org/traccar/protocol
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2017-11-24 16:52:41 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2017-11-24 16:52:41 +1300
commita358302a32872fe9d6def421166703f3a586e337 (patch)
tree4a52fde7d57d13a6d0f25980fbb8e8fc791f7132 /test/org/traccar/protocol
parent81a63d9a8fa90ddf94f32b76ff21a8adf9a6ef3a (diff)
downloadtraccar-server-a358302a32872fe9d6def421166703f3a586e337.tar.gz
traccar-server-a358302a32872fe9d6def421166703f3a586e337.tar.bz2
traccar-server-a358302a32872fe9d6def421166703f3a586e337.zip
Implement Starcom protocol
Diffstat (limited to 'test/org/traccar/protocol')
-rw-r--r--test/org/traccar/protocol/StarcomProtocolDecoderTest.java18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/org/traccar/protocol/StarcomProtocolDecoderTest.java b/test/org/traccar/protocol/StarcomProtocolDecoderTest.java
new file mode 100644
index 000000000..08369eccf
--- /dev/null
+++ b/test/org/traccar/protocol/StarcomProtocolDecoderTest.java
@@ -0,0 +1,18 @@
+package org.traccar.protocol;
+
+import org.junit.Test;
+import org.traccar.ProtocolTest;
+
+public class StarcomProtocolDecoderTest extends ProtocolTest {
+
+ @Test
+ public void testDecode() throws Exception {
+
+ StarcomProtocolDecoder decoder = new StarcomProtocolDecoder(new StarcomProtocol());
+
+ verifyPosition(decoder, text(
+ "|unit=836673,unittype=5,address=186.227.158.251,kind=1,pending=1,mileage=23.808,odometer=1300,logic_state=1,reason=1,eventid=52,response=1,longitude=-46.50328,latitude=-23.54878,altitude=786,gps_valid=1,gps_connected=1,satellites=7,velocity=1,heading=0,emergency=0,driver=0,ignition=1,door=1,arm=0,disarm=0,extra1=0,extra2=0,extra3=0,siren=0,lock=0,immobilizer=1,unlock=0,fuel=0,rpm=0,modemsignal=0,main_voltage=12.06,backup_voltage=-1.00,analog1=0.00,analog2=0.00,analog3=0.00,datetime_utc=2017/11/16 03:18:59,datetime_actual=2017/11/16 03:18:59,network=TCPIP.1|\r\n"));
+
+ }
+
+}