aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2018-03-12 04:56:12 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2018-03-12 04:56:12 +1300
commit4f3cd9dae285cfbd0ff541911381c08f50b59435 (patch)
tree9308e70f977e2c2f04b499de8ac02902b547c948 /test
parentd5c79363d91f6ae8594fe2cdde447c7efefaa798 (diff)
downloadtrackermap-server-4f3cd9dae285cfbd0ff541911381c08f50b59435.tar.gz
trackermap-server-4f3cd9dae285cfbd0ff541911381c08f50b59435.tar.bz2
trackermap-server-4f3cd9dae285cfbd0ff541911381c08f50b59435.zip
Implement Castelcom fuel cut commands
Diffstat (limited to 'test')
-rw-r--r--test/org/traccar/protocol/CastelProtocolEncoderTest.java22
1 files changed, 22 insertions, 0 deletions
diff --git a/test/org/traccar/protocol/CastelProtocolEncoderTest.java b/test/org/traccar/protocol/CastelProtocolEncoderTest.java
new file mode 100644
index 000000000..6e519363f
--- /dev/null
+++ b/test/org/traccar/protocol/CastelProtocolEncoderTest.java
@@ -0,0 +1,22 @@
+package org.traccar.protocol;
+
+import org.junit.Test;
+import org.traccar.ProtocolTest;
+import org.traccar.model.Command;
+
+public class CastelProtocolEncoderTest extends ProtocolTest {
+
+ @Test
+ public void testEncode() throws Exception {
+
+ CastelProtocolEncoder encoder = new CastelProtocolEncoder();
+
+ Command command = new Command();
+ command.setDeviceId(1);
+ command.setType(Command.TYPE_ENGINE_STOP);
+
+ verifyCommand(encoder, command, binary("40401a00043132333435363738393031323334350000000000834501c7280d0a"));
+
+ }
+
+}