diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2015-10-22 15:26:17 +1300 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2015-10-22 15:26:17 +1300 |
commit | 1ca95d099df96d576a0eaddc6e42b5b41aed3e06 (patch) | |
tree | 65ae84eb5e301317263fd72c31cc54922c71eb96 /test/org/traccar/protocol/M2mProtocolDecoderTest.java | |
parent | 122a26d2822f35b27b9cb0b217916d6b821d9654 (diff) | |
download | trackermap-server-1ca95d099df96d576a0eaddc6e42b5b41aed3e06.tar.gz trackermap-server-1ca95d099df96d576a0eaddc6e42b5b41aed3e06.tar.bz2 trackermap-server-1ca95d099df96d576a0eaddc6e42b5b41aed3e06.zip |
Refactor protocol unit testing
Diffstat (limited to 'test/org/traccar/protocol/M2mProtocolDecoderTest.java')
-rw-r--r-- | test/org/traccar/protocol/M2mProtocolDecoderTest.java | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/test/org/traccar/protocol/M2mProtocolDecoderTest.java b/test/org/traccar/protocol/M2mProtocolDecoderTest.java index fe6398f32..0f2c3c370 100644 --- a/test/org/traccar/protocol/M2mProtocolDecoderTest.java +++ b/test/org/traccar/protocol/M2mProtocolDecoderTest.java @@ -1,9 +1,9 @@ package org.traccar.protocol; import org.jboss.netty.buffer.ChannelBuffers; -import static org.traccar.helper.DecoderVerifier.verify; -import static org.junit.Assert.assertNull; + import org.junit.Test; +import org.traccar.ProtocolDecoderTest; import org.traccar.helper.ChannelBufferTools; public class M2mProtocolDecoderTest extends ProtocolDecoderTest { @@ -13,11 +13,11 @@ public class M2mProtocolDecoderTest extends ProtocolDecoderTest { M2mProtocolDecoder decoder = new M2mProtocolDecoder(new M2mProtocol()); - assertNull(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertHexString( - "235A3C2A2624215C287D70212A21254C7C6421220B0B0B")))); + verifyNothing(decoder, binary( + "235A3C2A2624215C287D70212A21254C7C6421220B0B0B")); - verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertHexString( - "A6E12C2AAADA4628326B2059576E30202A2FE85D20200B")))); + verifyPosition(decoder, binary( + "A6E12C2AAADA4628326B2059576E30202A2FE85D20200B")); } |