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/TaipProtocolDecoderTest.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/TaipProtocolDecoderTest.java')
-rw-r--r-- | test/org/traccar/protocol/TaipProtocolDecoderTest.java | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/test/org/traccar/protocol/TaipProtocolDecoderTest.java b/test/org/traccar/protocol/TaipProtocolDecoderTest.java index 78ccd4c7f..d9f74f33d 100644 --- a/test/org/traccar/protocol/TaipProtocolDecoderTest.java +++ b/test/org/traccar/protocol/TaipProtocolDecoderTest.java @@ -1,8 +1,7 @@ package org.traccar.protocol; -import static org.junit.Assert.assertNotNull; -import static org.traccar.helper.DecoderVerifier.verify; import org.junit.Test; +import org.traccar.ProtocolDecoderTest; public class TaipProtocolDecoderTest extends ProtocolDecoderTest { @@ -11,28 +10,28 @@ public class TaipProtocolDecoderTest extends ProtocolDecoderTest { TaipProtocolDecoder decoder = new TaipProtocolDecoder(new TaipProtocol(), false); - verify(decoder.decode(null, null, + verifyPosition(decoder, text( ">RGP230615010248-2682523-065236820000003007F4101;ID=0005;#0002;*2A<")); - verify(decoder.decode(null, null, + verifyPosition(decoder, text( ">RGP190805211932-3457215-058493640000000FFBF0300;ID=8251;#2122;*54<")); - assertNotNull(decoder.decode(null, null, + verifyPosition(decoder, text( ">RPV00000+3739438-1220384601512612;ID=1234;*7F")); - verify(decoder.decode(null, null, + verifyPosition(decoder, text( "\r\n>REV691615354941+3570173+1397742703203212;ID=Test")); - verify(decoder.decode(null, null, + verifyPosition(decoder, text( ">REV481599462982+2578391-0802945201228512;ID=Test")); - verify(decoder.decode(null, null, + verifyPosition(decoder, text( ">REV131756153215+3359479-0075299001031332;VO=10568798;IO=310;SV=10;BL=4190;CV09=0;AD=0;AL=+47;ID=356612021059680")); - - assertNotNull(decoder.decode(null, null, + + verifyPosition(decoder, text( ">RPV02138+4555512-0735478000000032;ID=1005;*76<")); - - assertNotNull(decoder.decode(null, null, + + verifyPosition(decoder, text( ">RPV19105+4538405-0739518900000012;ID=9999;*7A<\r\n")); } |