aboutsummaryrefslogtreecommitdiff
path: root/test/org
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2018-06-11 21:27:36 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2018-06-11 21:27:48 +1200
commitcac3ddae39938a0d25c9b2a1f7fa87ecb9dd2b77 (patch)
tree8505352c7bc45f214c58c602479af19c3b614379 /test/org
parent9cbd8fafc312996b9b5dae68b6c3ecf68d8facf0 (diff)
downloadtrackermap-server-cac3ddae39938a0d25c9b2a1f7fa87ecb9dd2b77.tar.gz
trackermap-server-cac3ddae39938a0d25c9b2a1f7fa87ecb9dd2b77.tar.bz2
trackermap-server-cac3ddae39938a0d25c9b2a1f7fa87ecb9dd2b77.zip
Implement eSeal commands
Diffstat (limited to 'test/org')
-rw-r--r--test/org/traccar/protocol/EsealProtocolEncoderTest.java24
1 files changed, 24 insertions, 0 deletions
diff --git a/test/org/traccar/protocol/EsealProtocolEncoderTest.java b/test/org/traccar/protocol/EsealProtocolEncoderTest.java
new file mode 100644
index 000000000..16f00d69b
--- /dev/null
+++ b/test/org/traccar/protocol/EsealProtocolEncoderTest.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 EsealProtocolEncoderTest extends ProtocolTest {
+
+ @Test
+ public void testEncode() throws Exception {
+
+ EsealProtocolEncoder encoder = new EsealProtocolEncoder();
+
+ Command command = new Command();
+ command.setDeviceId(1);
+ command.setType(Command.TYPE_ALARM_DISARM);
+
+ assertEquals("##S,eSeal,123456789012345,256,3.0.8,RC-Unlock,E##", encoder.encodeCommand(command));
+
+ }
+
+}