diff options
author | Anatoliy Golubev <darth.naihil@gmail.com> | 2017-09-10 01:51:31 +0300 |
---|---|---|
committer | Anatoliy Golubev <darth.naihil@gmail.com> | 2017-09-10 01:51:31 +0300 |
commit | 07e4e89be6e658239125a8b99e05ce4d132e1d9e (patch) | |
tree | ccba1b479bfb75f46c7891a851b7d570fccf3549 /test/org/traccar/protocol | |
parent | cdc7a0a0f8ba48b9581efeaeaa902f5a4ddcc306 (diff) | |
download | traccar-server-07e4e89be6e658239125a8b99e05ce4d132e1d9e.tar.gz traccar-server-07e4e89be6e658239125a8b99e05ce4d132e1d9e.tar.bz2 traccar-server-07e4e89be6e658239125a8b99e05ce4d132e1d9e.zip |
Inherit AdmProtocolEncoder from StringProtocolEncoder
Diffstat (limited to 'test/org/traccar/protocol')
-rw-r--r-- | test/org/traccar/protocol/AdmProtocolEncoderTest.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/test/org/traccar/protocol/AdmProtocolEncoderTest.java b/test/org/traccar/protocol/AdmProtocolEncoderTest.java index 3a72036bf..6d2452e26 100644 --- a/test/org/traccar/protocol/AdmProtocolEncoderTest.java +++ b/test/org/traccar/protocol/AdmProtocolEncoderTest.java @@ -16,6 +16,7 @@ */ package org.traccar.protocol; +import org.junit.Assert; import org.junit.Test; import org.traccar.ProtocolTest; import org.traccar.model.Command; @@ -30,13 +31,13 @@ public class AdmProtocolEncoderTest extends ProtocolTest { Command command = new Command(); command.setDeviceId(1); command.setType(Command.TYPE_GET_DEVICE_STATUS); - verifyCommand(encoder, command, binary("5354415455530D0A")); + Assert.assertEquals("STATUS\r\n", encoder.encodeCommand(command)); command = new Command(); command.setDeviceId(1); command.setType(Command.TYPE_CUSTOM); command.set(Command.KEY_DATA, "INPUT 0"); - verifyCommand(encoder, command, binary("494E50555420300D0A")); + Assert.assertEquals("INPUT 0\r\n", encoder.encodeCommand(command)); } } |