aboutsummaryrefslogtreecommitdiff
path: root/test/org/traccar
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2019-01-13 13:44:39 -0800
committerGitHub <noreply@github.com>2019-01-13 13:44:39 -0800
commit4650b7f1c866c9471a7ae79eb355256976d4b6c5 (patch)
tree3bea7545e337aed78c7d0f600ed2259ce27ddb41 /test/org/traccar
parentf61154b15a707e24e306e77149b27acef31d97a4 (diff)
parent50eb6e7ec6364866e4934bb6fd1dd668e8e9fa69 (diff)
downloadtraccar-server-4650b7f1c866c9471a7ae79eb355256976d4b6c5.tar.gz
traccar-server-4650b7f1c866c9471a7ae79eb355256976d4b6c5.tar.bz2
traccar-server-4650b7f1c866c9471a7ae79eb355256976d4b6c5.zip
Merge pull request #4191 from flocsy/TK-binary
fixed exception when String.format thought the binary data has formt placeholders
Diffstat (limited to 'test/org/traccar')
-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 d7784f50b..9b9e68cdb 100644
--- a/test/org/traccar/protocol/WatchProtocolEncoderTest.java
+++ b/test/org/traccar/protocol/WatchProtocolEncoderTest.java
@@ -35,6 +35,12 @@ public class WatchProtocolEncoderTest extends ProtocolTest {
command = new Command();
command.setDeviceId(1);
+ command.setType(Command.TYPE_VOICE_MESSAGE);
+ command.set(Command.KEY_DATA, "2321414d520a2573");
+ assertEquals("[CS*123456789012345*000b*TK,#!AMR\n%s]", 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));