aboutsummaryrefslogtreecommitdiff
path: root/test/org/traccar/protocol/WatchProtocolEncoderTest.java
diff options
context:
space:
mode:
authorGavriel Fleischer <flocsy@gmail.com>2019-01-14 20:00:01 +0200
committerGavriel Fleischer <flocsy@gmail.com>2019-01-14 20:00:01 +0200
commit872f672e7832da3755cb7576f04dd2aec4132bd5 (patch)
tree3051f972ec54f9243467947e1d7091ecbb2eefd6 /test/org/traccar/protocol/WatchProtocolEncoderTest.java
parent52b30b6c282e7385783803a5c9d1ce2a0e5e8be6 (diff)
downloadtrackermap-server-872f672e7832da3755cb7576f04dd2aec4132bd5.tar.gz
trackermap-server-872f672e7832da3755cb7576f04dd2aec4132bd5.tar.bz2
trackermap-server-872f672e7832da3755cb7576f04dd2aec4132bd5.zip
added test for MESSAGE
Diffstat (limited to 'test/org/traccar/protocol/WatchProtocolEncoderTest.java')
-rw-r--r--test/org/traccar/protocol/WatchProtocolEncoderTest.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/org/traccar/protocol/WatchProtocolEncoderTest.java b/test/org/traccar/protocol/WatchProtocolEncoderTest.java
index 9b9e68cdb..e088a2b04 100644
--- a/test/org/traccar/protocol/WatchProtocolEncoderTest.java
+++ b/test/org/traccar/protocol/WatchProtocolEncoderTest.java
@@ -41,6 +41,12 @@ public class WatchProtocolEncoderTest extends ProtocolTest {
command = new Command();
command.setDeviceId(1);
+ command.setType(Command.TYPE_MESSAGE);
+ command.set(Command.KEY_MESSAGE, "text");
+ assertEquals("[CS*123456789012345*0010*MESSAGE,74657874]", encoder.encodeCommand(null, command));
+
+ command = new Command();
+ command.setDeviceId(1);
command.setType(Command.TYPE_CUSTOM);
command.set(Command.KEY_DATA, "WORK,6-9,11-13,13-15,17-19");
assertEquals("[CS*123456789012345*001a*WORK,6-9,11-13,13-15,17-19]", encoder.encodeCommand(null, command));