From d8552cb2975ec8a78ed07e0ec0f1ba1c7d34086a Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Tue, 15 Mar 2016 22:16:47 +1300 Subject: Implement send SMS Meitrack command --- test/org/traccar/protocol/MeitrackProtocolEncoderTest.java | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'test') diff --git a/test/org/traccar/protocol/MeitrackProtocolEncoderTest.java b/test/org/traccar/protocol/MeitrackProtocolEncoderTest.java index 64812c1da..3e0a870d0 100644 --- a/test/org/traccar/protocol/MeitrackProtocolEncoderTest.java +++ b/test/org/traccar/protocol/MeitrackProtocolEncoderTest.java @@ -18,6 +18,13 @@ public class MeitrackProtocolEncoderTest extends ProtocolTest { Assert.assertEquals("@@Q25,123456789012345,A10*68\r\n", encoder.encodeCommand(command)); + command.setDeviceId(1); + command.setType(Command.TYPE_SEND_SMS); + command.set(Command.KEY_PHONE_NUMBER, "15360853789"); + command.set(Command.KEY_MESSAGE, "Meitrack"); + + Assert.assertEquals("@@f48,123456789012345,C02,0,15360853789,Meitrack*B0\r\n", encoder.encodeCommand(command)); + } } -- cgit v1.2.3