aboutsummaryrefslogtreecommitdiff
path: root/src/test/java
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/java')
-rw-r--r--src/test/java/org/traccar/protocol/TotemProtocolEncoderTest.java18
1 files changed, 16 insertions, 2 deletions
diff --git a/src/test/java/org/traccar/protocol/TotemProtocolEncoderTest.java b/src/test/java/org/traccar/protocol/TotemProtocolEncoderTest.java
index 51e5bac92..a4fca2d9e 100644
--- a/src/test/java/org/traccar/protocol/TotemProtocolEncoderTest.java
+++ b/src/test/java/org/traccar/protocol/TotemProtocolEncoderTest.java
@@ -15,10 +15,24 @@ public class TotemProtocolEncoderTest extends ProtocolTest {
Command command = new Command();
command.setDeviceId(2);
- command.setType(Command.TYPE_ENGINE_STOP);
+ command.setType(Command.TYPE_REBOOT_DEVICE);
command.set(Command.KEY_DEVICE_PASSWORD, "000000");
- assertEquals("*000000,025,C,1#", encoder.encodeCommand(command));
+ assertEquals("$$0020CF000000,0061D", encoder.encodeCommand(command));
+
+ }
+
+ @Test
+ public void testSmsEncode() throws Exception {
+
+ var encoder = new TotemProtocolSmsEncoder(null);
+
+ Command command = new Command();
+ command.setDeviceId(2);
+ command.setType(Command.TYPE_REBOOT_DEVICE);
+ command.set(Command.KEY_DEVICE_PASSWORD, "000000");
+
+ assertEquals("*000000,006#", encoder.encodeCommand(command));
}