aboutsummaryrefslogtreecommitdiff
path: root/src/test/java/org/traccar
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/java/org/traccar')
-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));
+
+ }
+
+}