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/GatorProtocolDecoderTest.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'test/org/traccar/protocol/GatorProtocolDecoderTest.java') diff --git a/test/org/traccar/protocol/GatorProtocolDecoderTest.java b/test/org/traccar/protocol/GatorProtocolDecoderTest.java index fb49013b8..251987cb0 100644 --- a/test/org/traccar/protocol/GatorProtocolDecoderTest.java +++ b/test/org/traccar/protocol/GatorProtocolDecoderTest.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 org.junit.Test; import org.traccar.helper.ChannelBufferTools; @@ -14,10 +15,10 @@ public class GatorProtocolDecoderTest { decoder.setDataManager(new TestDataManager()); int[] buf1 = {0x24,0x24,0x81,0x00,0x23,0x0C,0xA2,0x32,0x85,0x10,0x03,0x06,0x14,0x59,0x07,0x02,0x23,0x46,0x90,0x11,0x35,0x29,0x47,0x00,0x00,0x00,0x00,0xC0,0x40,0x01,0x01,0x2C,0x0E,0x11,0x00,0x00,0x00,0x21,0xCB,0x0D}; - assertNotNull(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertArray(buf1)))); + verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertArray(buf1)))); int[] buf2 = {0x24,0x24,0x80,0x00,0x23,0xc2,0x63,0x1e,0x00,0x11,0x12,0x20,0x10,0x49,0x09,0x83,0x32,0x68,0x64,0x87,0x03,0x80,0x41,0x00,0x00,0x00,0x00,0xc0,0x47,0x00,0x00,0x00,0x0b,0x4e,0x00,0x00,0x00,0x00,0x55,0x0d}; - assertNotNull(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertArray(buf2)))); + verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertArray(buf2)))); } -- cgit v1.2.3