aboutsummaryrefslogtreecommitdiff
path: root/src/test/java/org/traccar/protocol
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2019-04-29 23:59:55 -0700
committerAnton Tananaev <anton.tananaev@gmail.com>2019-04-29 23:59:55 -0700
commit3190df1c77db9b17691bfd469c3f92de58ea14ed (patch)
tree44d138a1fc9a023ec5df513c2818f39997cb9bd8 /src/test/java/org/traccar/protocol
parent97d471f2bed2d2a5a59d20c24c1594fa3c55d760 (diff)
downloadtrackermap-server-3190df1c77db9b17691bfd469c3f92de58ea14ed.tar.gz
trackermap-server-3190df1c77db9b17691bfd469c3f92de58ea14ed.tar.bz2
trackermap-server-3190df1c77db9b17691bfd469c3f92de58ea14ed.zip
Implement Fifotrack commands
Diffstat (limited to 'src/test/java/org/traccar/protocol')
-rw-r--r--src/test/java/org/traccar/protocol/FifotrackProtocolEncoderTest.java24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/test/java/org/traccar/protocol/FifotrackProtocolEncoderTest.java b/src/test/java/org/traccar/protocol/FifotrackProtocolEncoderTest.java
new file mode 100644
index 000000000..53ae8510a
--- /dev/null
+++ b/src/test/java/org/traccar/protocol/FifotrackProtocolEncoderTest.java
@@ -0,0 +1,24 @@
+package org.traccar.protocol;
+
+import org.junit.Test;
+import org.traccar.ProtocolTest;
+import org.traccar.model.Command;
+
+import static org.junit.Assert.assertEquals;
+
+public class FifotrackProtocolEncoderTest extends ProtocolTest {
+
+ @Test
+ public void testEncode() throws Exception {
+
+ FifotrackProtocolEncoder encoder = new FifotrackProtocolEncoder();
+
+ Command command = new Command();
+ command.setDeviceId(1);
+ command.setType(Command.TYPE_REQUEST_PHOTO);
+
+ assertEquals("##24,123456789012345,1,D05,3*9F\r\n", encoder.encodeCommand(command));
+
+ }
+
+}