diff options
Diffstat (limited to 'src/test/java/org/traccar/protocol')
-rw-r--r-- | src/test/java/org/traccar/protocol/HuaShengProtocolEncoderTest.java | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/test/java/org/traccar/protocol/HuaShengProtocolEncoderTest.java b/src/test/java/org/traccar/protocol/HuaShengProtocolEncoderTest.java index b44f6e89c..c320d4aa9 100644 --- a/src/test/java/org/traccar/protocol/HuaShengProtocolEncoderTest.java +++ b/src/test/java/org/traccar/protocol/HuaShengProtocolEncoderTest.java @@ -11,7 +11,17 @@ public class HuaShengProtocolEncoderTest extends ProtocolTest { var encoder = inject(new HuaShengProtocolEncoder(null)); - Command command = new Command(); + Command command; + + command = new Command(); + command.setDeviceId(1); + command.setType(Command.TYPE_OUTPUT_CONTROL); + command.set(Command.KEY_INDEX, 1); + command.set(Command.KEY_DATA, "1"); + + verifyCommand(encoder, command, binary("c00000000daa1600000000000101c0")); + + command = new Command(); command.setDeviceId(1); command.setType(Command.TYPE_POSITION_PERIODIC); command.set(Command.KEY_FREQUENCY, 60); |