From 872f672e7832da3755cb7576f04dd2aec4132bd5 Mon Sep 17 00:00:00 2001 From: Gavriel Fleischer Date: Mon, 14 Jan 2019 20:00:01 +0200 Subject: added test for MESSAGE --- test/org/traccar/protocol/WatchProtocolEncoderTest.java | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'test/org/traccar') 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 @@ -39,6 +39,12 @@ public class WatchProtocolEncoderTest extends ProtocolTest { 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_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); -- cgit v1.2.3