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/GotopProtocolDecoderTest.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/GotopProtocolDecoderTest.java')
-rw-r--r-- | test/org/traccar/protocol/GotopProtocolDecoderTest.java | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/test/org/traccar/protocol/GotopProtocolDecoderTest.java b/test/org/traccar/protocol/GotopProtocolDecoderTest.java index 260114bc7..dcafd5add 100644 --- a/test/org/traccar/protocol/GotopProtocolDecoderTest.java +++ b/test/org/traccar/protocol/GotopProtocolDecoderTest.java @@ -1,8 +1,7 @@ package org.traccar.protocol; -import static org.traccar.helper.DecoderVerifier.verify; -import static org.junit.Assert.assertNull; import org.junit.Test; +import org.traccar.ProtocolDecoderTest; public class GotopProtocolDecoderTest extends ProtocolDecoderTest { @@ -11,23 +10,23 @@ public class GotopProtocolDecoderTest extends ProtocolDecoderTest { GotopProtocolDecoder decoder = new GotopProtocolDecoder(new GotopProtocol()); - assertNull(decoder.decode(null, null, "")); + verifyNothing(decoder, text( "")); - assertNull(decoder.decode(null, null, "353327020412763,CMD-X")); + verifyNothing(decoder, text( "353327020412763,CMD-X")); - verify(decoder.decode(null, null, + verifyPosition(decoder, text( "013226009991924,CMD-T,A,DATE:130802,TIME:153721,LAT:25.9757433S,LOT:028.1087816E,Speed:000.0,X-X-X-X-81-26,000,65501-00A0-4B8E")); - verify(decoder.decode(null, null, + verifyPosition(decoder, text( "353327020115804,CMD-T,A,DATE:090329,TIME:223252,LAT:22.7634066N,LOT:114.3964783E,Speed:000.0,84-20,000")); - verify(decoder.decode(null, null, + verifyPosition(decoder, text( "353327020115804,CMD-T,A,DATE:090329,TIME:223252,LAT:22.7634066N,LOT:114.3964783E,Speed:000.0,1-1-0-84-20,000")); - verify(decoder.decode(null, null, + verifyPosition(decoder, text( "353327020412763,CMD-F,V,DATE:140125,TIME:183636,LAT:51.6384466N,LOT:000.2863866E,Speed:000.0,61-19,")); - verify(decoder.decode(null, null, + verifyPosition(decoder, text( "013949008891817,CMD-F,A,DATE:150225,TIME:175441,LAT:50.000000N,LOT:008.000000E,Speed:085.9,0-0-0-0-52-31,000,26201-1073-1DF5")); } |