diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2013-11-09 19:01:19 +1300 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2013-11-09 19:01:19 +1300 |
commit | cf0565caceee6856328e481dd23600ed2590c88a (patch) | |
tree | 9d2cc8cf8d3eb27b36412eb492ad702581891f1c /test/org/traccar/protocol/OsmAndProtocolDecoderTest.java | |
parent | f9ecee5b732b0c82c8a95bebdb5e275ea479cccc (diff) | |
download | trackermap-server-cf0565caceee6856328e481dd23600ed2590c88a.tar.gz trackermap-server-cf0565caceee6856328e481dd23600ed2590c88a.tar.bz2 trackermap-server-cf0565caceee6856328e481dd23600ed2590c88a.zip |
Improve unit test verification
Diffstat (limited to 'test/org/traccar/protocol/OsmAndProtocolDecoderTest.java')
-rw-r--r-- | test/org/traccar/protocol/OsmAndProtocolDecoderTest.java | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/test/org/traccar/protocol/OsmAndProtocolDecoderTest.java b/test/org/traccar/protocol/OsmAndProtocolDecoderTest.java index 2a5b1baf0..72a19a55e 100644 --- a/test/org/traccar/protocol/OsmAndProtocolDecoderTest.java +++ b/test/org/traccar/protocol/OsmAndProtocolDecoderTest.java @@ -1,9 +1,10 @@ package org.traccar.protocol; +import org.traccar.helper.TestDataManager; import org.jboss.netty.handler.codec.http.DefaultHttpRequest; import org.jboss.netty.handler.codec.http.HttpMethod; import org.jboss.netty.handler.codec.http.HttpVersion; -import static org.junit.Assert.assertNotNull; +import static org.traccar.helper.DecoderVerifier.verify; import org.junit.Test; public class OsmAndProtocolDecoderTest { @@ -14,13 +15,13 @@ public class OsmAndProtocolDecoderTest { OsmAndProtocolDecoder decoder = new OsmAndProtocolDecoder(null); decoder.setDataManager(new TestDataManager()); - assertNotNull(decoder.decode(null, null, new DefaultHttpRequest(HttpVersion.HTTP_1_1, HttpMethod.GET, + verify(decoder.decode(null, null, new DefaultHttpRequest(HttpVersion.HTTP_1_1, HttpMethod.GET, "/?id=123456×tamp=1377177267&lat=60.0&lon=30.0&speed=0.0&bearing=0.0&altitude=0&hdop=0.0"))); - assertNotNull(decoder.decode(null, null, new DefaultHttpRequest(HttpVersion.HTTP_1_1, HttpMethod.GET, + verify(decoder.decode(null, null, new DefaultHttpRequest(HttpVersion.HTTP_1_1, HttpMethod.GET, "/?id=123456×tamp=1377177267&lat=60.0&lon=30.0"))); - assertNotNull(decoder.decode(null, null, new DefaultHttpRequest(HttpVersion.HTTP_1_1, HttpMethod.GET, + verify(decoder.decode(null, null, new DefaultHttpRequest(HttpVersion.HTTP_1_1, HttpMethod.GET, "/?lat=60.0&lon=30.0&speed=0.0&heading=0.0&vacc=0&hacc=0&altitude=0&deviceid=123456"))); } |