aboutsummaryrefslogtreecommitdiff
path: root/test/org/traccar/protocol/CastelProtocolEncoderTest.java
diff options
context:
space:
mode:
authorKevin Goos <kevingoos@telenet.be>2018-03-16 13:24:17 +0100
committerGitHub <noreply@github.com>2018-03-16 13:24:17 +0100
commit25a36fe2fb8045e455de5e936c286c4db8b40563 (patch)
tree074a212284fdc3e8779ca55f8694f8e92c24e8a7 /test/org/traccar/protocol/CastelProtocolEncoderTest.java
parent1216e3bee2abfecedfe1250a9dd5d45c83a2fc02 (diff)
parent38c1ff9bccc1c417a0c2b412271aa7240a3b7db7 (diff)
downloadtrackermap-server-25a36fe2fb8045e455de5e936c286c4db8b40563.tar.gz
trackermap-server-25a36fe2fb8045e455de5e936c286c4db8b40563.tar.bz2
trackermap-server-25a36fe2fb8045e455de5e936c286c4db8b40563.zip
Merge branch 'master' into master
Diffstat (limited to 'test/org/traccar/protocol/CastelProtocolEncoderTest.java')
-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..fc0a92c86
--- /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("40401a00043132333435363738393031323334350000000000458301fe6a0d0a"));
+
+ }
+
+}