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/CityeasyProtocolEncoderTest.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/CityeasyProtocolEncoderTest.java')
-rw-r--r-- | test/org/traccar/protocol/CityeasyProtocolEncoderTest.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/org/traccar/protocol/CityeasyProtocolEncoderTest.java b/test/org/traccar/protocol/CityeasyProtocolEncoderTest.java index 19efb7af4..4ef3c48ef 100644 --- a/test/org/traccar/protocol/CityeasyProtocolEncoderTest.java +++ b/test/org/traccar/protocol/CityeasyProtocolEncoderTest.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 CityeasyProtocolEncoderTest { +public class CityeasyProtocolEncoderTest extends ProtocolTest { @Test public void testEncode() throws Exception { @@ -20,8 +21,7 @@ public class CityeasyProtocolEncoderTest { command.setType(Command.TYPE_SET_TIMEZONE); command.set(Command.KEY_TIMEZONE, 6 * 3600); - Assert.assertEquals(encoder.encodeCommand(command), ChannelBuffers.wrappedBuffer( - DatatypeConverter.parseHexBinary("5353001100080001680000000B60820D0A"))); + verifyCommand(encoder, command, binary("5353001100080001680000000B60820D0A")); } |