aboutsummaryrefslogtreecommitdiff
path: root/src/test/java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2019-09-11 23:07:01 -0700
committerAnton Tananaev <anton.tananaev@gmail.com>2019-09-11 23:07:01 -0700
commitfdf79f2cae03398e2a6d1ab86f710796dcc11b64 (patch)
treed40ebef11df790ef7f124756b2cc07e63d1137e9 /src/test/java
parentd33a48db3bdefd6bf3772432aaa26b0eb2f70d44 (diff)
downloadtraccar-server-fdf79f2cae03398e2a6d1ab86f710796dcc11b64.tar.gz
traccar-server-fdf79f2cae03398e2a6d1ab86f710796dcc11b64.tar.bz2
traccar-server-fdf79f2cae03398e2a6d1ab86f710796dcc11b64.zip
Implement RST protocol
Diffstat (limited to 'src/test/java')
-rw-r--r--src/test/java/org/traccar/protocol/RstProtocolDecoderTest.java26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/test/java/org/traccar/protocol/RstProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/RstProtocolDecoderTest.java
new file mode 100644
index 000000000..4a8ba1719
--- /dev/null
+++ b/src/test/java/org/traccar/protocol/RstProtocolDecoderTest.java
@@ -0,0 +1,26 @@
+package org.traccar.protocol;
+
+import org.junit.Test;
+import org.traccar.ProtocolTest;
+import org.traccar.model.Position;
+
+public class RstProtocolDecoderTest extends ProtocolTest {
+
+ @Test
+ public void testDecode() throws Exception {
+
+ RstProtocolDecoder decoder = new RstProtocolDecoder(null);
+
+ verifyAttribute(decoder, text(
+ "RST;A;RST-MINIv2;V7.00;008033985;1;7;30-08-2019 11:31:38;30-08-2019 11:31:15;-23.645868;-46.637741;0;226;828;0;10;0;00;20;00;1A;02;0.02;3.40;0;0;FE;0000;04;80;11;0;"),
+ Position.KEY_BATTERY, 3.40);
+
+ verifyPosition(decoder, text(
+ "RST;A;RST-MINIv2;V7.00;008033985;1;7;30-08-2019 11:31:38;30-08-2019 11:31:15;-23.645868;-46.637741;0;226;828;0;10;0;00;20;00;1A;02;0.02;3.40;0;0;FE;0000;04;80;11;0;"));
+
+ verifyPosition(decoder, text(
+ "RST;A;RST-MINIv2;V7.00;008033985;6;47;30-08-2019 19:01:13;30-08-2019 19:01:14;-23.645851;-46.637817;0;294;811;1;11;0;00;30;00;1A;02;3.82;4.16;0;0;FE;0000;02;40;71;000001F60A55;"));
+
+ }
+
+}