From cf0565caceee6856328e481dd23600ed2590c88a Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Sat, 9 Nov 2013 19:01:19 +1300 Subject: Improve unit test verification --- test/org/traccar/protocol/M2mProtocolDecoderTest.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'test/org/traccar/protocol/M2mProtocolDecoderTest.java') diff --git a/test/org/traccar/protocol/M2mProtocolDecoderTest.java b/test/org/traccar/protocol/M2mProtocolDecoderTest.java index 3ea2131c9..097a783bc 100644 --- a/test/org/traccar/protocol/M2mProtocolDecoderTest.java +++ b/test/org/traccar/protocol/M2mProtocolDecoderTest.java @@ -1,7 +1,8 @@ package org.traccar.protocol; +import org.traccar.helper.TestDataManager; import org.jboss.netty.buffer.ChannelBuffers; -import static org.junit.Assert.assertNotNull; +import static org.traccar.helper.DecoderVerifier.verify; import static org.junit.Assert.assertNull; import org.junit.Test; import org.traccar.helper.ChannelBufferTools; @@ -18,7 +19,7 @@ public class M2mProtocolDecoderTest { assertNull(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertArray(buf1)))); int[] buf2 = {0xA6,0xE1,0x2C,0x2A,0xAA,0xDA,0x46,0x28,0x32,0x6B,0x20,0x59,0x57,0x6E,0x30,0x20,0x2A,0x2F,0xE8,0x5D,0x20,0x20,0x0B}; - assertNotNull(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertArray(buf2)))); + verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertArray(buf2)))); } -- cgit v1.2.3