aboutsummaryrefslogtreecommitdiff
path: root/test/org/traccar/protocol/EelinkProtocolEncoderTest.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2017-11-28 20:01:45 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2017-11-28 20:01:58 +1300
commit818fff6daf87a9e90a225122d04dc8b93694a8c6 (patch)
tree8f24ab85903d404023a27c35566efe6320da5dee /test/org/traccar/protocol/EelinkProtocolEncoderTest.java
parent97360131f2f5f53c79e4d41a3e5b3bfebe49d960 (diff)
downloadtrackermap-server-818fff6daf87a9e90a225122d04dc8b93694a8c6.tar.gz
trackermap-server-818fff6daf87a9e90a225122d04dc8b93694a8c6.tar.bz2
trackermap-server-818fff6daf87a9e90a225122d04dc8b93694a8c6.zip
Fix eelink checksum and decode result
Diffstat (limited to 'test/org/traccar/protocol/EelinkProtocolEncoderTest.java')
-rw-r--r--test/org/traccar/protocol/EelinkProtocolEncoderTest.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/org/traccar/protocol/EelinkProtocolEncoderTest.java b/test/org/traccar/protocol/EelinkProtocolEncoderTest.java
index e0843b36d..96be348d1 100644
--- a/test/org/traccar/protocol/EelinkProtocolEncoderTest.java
+++ b/test/org/traccar/protocol/EelinkProtocolEncoderTest.java
@@ -9,13 +9,13 @@ public class EelinkProtocolEncoderTest extends ProtocolTest {
@Test
public void testEncode() throws Exception {
- EelinkProtocolEncoder encoder = new EelinkProtocolEncoder(false);
-
Command command = new Command();
command.setDeviceId(1);
command.setType(Command.TYPE_ENGINE_STOP);
- verifyCommand(encoder, command, binary("676780000f0000010000000052454c41592c3123"));
+ verifyCommand(new EelinkProtocolEncoder(false), command, binary("676780000f0000010000000052454c41592c3123"));
+
+ verifyCommand(new EelinkProtocolEncoder(true), command, binary("454c0022b41a0123456789012345676780000f0000010000000052454c41592c3123"));
}