diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2019-01-14 11:19:26 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-14 11:19:26 -0800 |
commit | ff0572b84c85f2bcfb177d1fe7a119a6dc51627a (patch) | |
tree | 3051f972ec54f9243467947e1d7091ecbb2eefd6 /test | |
parent | 4650b7f1c866c9471a7ae79eb355256976d4b6c5 (diff) | |
parent | 872f672e7832da3755cb7576f04dd2aec4132bd5 (diff) | |
download | trackermap-server-ff0572b84c85f2bcfb177d1fe7a119a6dc51627a.tar.gz trackermap-server-ff0572b84c85f2bcfb177d1fe7a119a6dc51627a.tar.bz2 trackermap-server-ff0572b84c85f2bcfb177d1fe7a119a6dc51627a.zip |
Merge pull request #4192 from flocsy/send-message
Send message (that is displayed on the watch's display)
Diffstat (limited to 'test')
-rw-r--r-- | test/org/traccar/protocol/WatchProtocolEncoderTest.java | 6 |
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)); |