diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2015-12-06 14:57:47 +1300 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2015-12-06 14:57:47 +1300 |
commit | c2fd8d145eb45ceb96fad3c84605e8c39adf81fe (patch) | |
tree | 48e13b0cf37bf6bb2f6bdb2be3d591f48b1a9b3a /test/org/traccar/protocol/KhdProtocolEncoderTest.java | |
parent | 1e2d7682880e57cde051d2e54c0f792aa3fc5ec3 (diff) | |
download | trackermap-server-c2fd8d145eb45ceb96fad3c84605e8c39adf81fe.tar.gz trackermap-server-c2fd8d145eb45ceb96fad3c84605e8c39adf81fe.tar.bz2 trackermap-server-c2fd8d145eb45ceb96fad3c84605e8c39adf81fe.zip |
Combine decoder and encoder test utils
Diffstat (limited to 'test/org/traccar/protocol/KhdProtocolEncoderTest.java')
-rw-r--r-- | test/org/traccar/protocol/KhdProtocolEncoderTest.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/org/traccar/protocol/KhdProtocolEncoderTest.java b/test/org/traccar/protocol/KhdProtocolEncoderTest.java index 2a3fb524b..e453deaf5 100644 --- a/test/org/traccar/protocol/KhdProtocolEncoderTest.java +++ b/test/org/traccar/protocol/KhdProtocolEncoderTest.java @@ -3,12 +3,13 @@ package org.traccar.protocol; import org.jboss.netty.buffer.ChannelBuffers; import org.junit.Assert; import org.junit.Test; +import org.traccar.ProtocolTest; import org.traccar.helper.ChannelBufferTools; import org.traccar.model.Command; import javax.xml.bind.DatatypeConverter; -public class KhdProtocolEncoderTest { +public class KhdProtocolEncoderTest extends ProtocolTest { @Test public void testEncode() throws Exception { @@ -19,8 +20,7 @@ public class KhdProtocolEncoderTest { command.setDeviceId(1); command.setType(Command.TYPE_ENGINE_STOP); - Assert.assertEquals(encoder.encodeCommand(command), ChannelBuffers.wrappedBuffer( - DatatypeConverter.parseHexBinary("2929390006000000003F0D"))); + verifyCommand(encoder, command, binary("2929390006000000003F0D")); } |