diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2019-04-29 23:59:55 -0700 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2019-04-29 23:59:55 -0700 |
commit | 3190df1c77db9b17691bfd469c3f92de58ea14ed (patch) | |
tree | 44d138a1fc9a023ec5df513c2818f39997cb9bd8 /src/test/java/org/traccar/protocol | |
parent | 97d471f2bed2d2a5a59d20c24c1594fa3c55d760 (diff) | |
download | trackermap-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.java | 24 |
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)); + + } + +} |