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/Tlt2hProtocolDecoderTest.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/Tlt2hProtocolDecoderTest.java')
-rw-r--r-- | test/org/traccar/protocol/Tlt2hProtocolDecoderTest.java | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/test/org/traccar/protocol/Tlt2hProtocolDecoderTest.java b/test/org/traccar/protocol/Tlt2hProtocolDecoderTest.java index 8de9f9ac8..b0f90a82d 100644 --- a/test/org/traccar/protocol/Tlt2hProtocolDecoderTest.java +++ b/test/org/traccar/protocol/Tlt2hProtocolDecoderTest.java @@ -1,7 +1,7 @@ package org.traccar.protocol; -import static org.traccar.helper.DecoderVerifier.verify; import org.junit.Test; +import org.traccar.ProtocolDecoderTest; public class Tlt2hProtocolDecoderTest extends ProtocolDecoderTest { @@ -10,31 +10,31 @@ public class Tlt2hProtocolDecoderTest extends ProtocolDecoderTest { Tlt2hProtocolDecoder decoder = new Tlt2hProtocolDecoder(new Tlt2hProtocol()); - verify(decoder.decode(null, null, - "#357671030946351#V500#0000#AUTO#1\r\n" + + verifyPositions(decoder, text( + "#357671030946351#V500#0000#AUTO#1\r\n", "#$GPRMC,223835.000,A,0615.3545,S,10708.5779,E,14.62,97.41,070313,,,D*70\r\n")); - verify(decoder.decode(null, null, - "\r\n#357671030946351#V500#0000#AUTO#1\r\n" + + verifyPositions(decoder, text( + "\r\n#357671030946351#V500#0000#AUTO#1\r\n", "#$GPRMC,223835.000,A,0615.3545,S,10708.5779,E,14.62,97.41,070313,,,D*70\r\n")); - verify(decoder.decode(null, null, - "#357671030938911#V500#0000#AUTOSTOP#1\r\n" + + verifyPositions(decoder, text( + "#357671030938911#V500#0000#AUTOSTOP#1\r\n", "#00b34d3c$GPRMC,140026.000,A,2623.6452,S,02828.8990,E,0.00,65.44,130213,,,A*4B\r\n")); - verify(decoder.decode(null, null, - "#123456789000001#V3338#0000#SMS#3\r\n" + - "#25ee0dff$GPRMC,083945.180,A,2233.4249,N,11406.0046,E,0.00,315.00,251207,,,A*6E\r\n" + - "#25ee0dff$GPRMC,083950.180,A,2233.4249,N,11406.0046,E,0.00,315.00,251207,,,A*6E\r\n" + + verifyPositions(decoder, text( + "#123456789000001#V3338#0000#SMS#3\r\n", + "#25ee0dff$GPRMC,083945.180,A,2233.4249,N,11406.0046,E,0.00,315.00,251207,,,A*6E\r\n", + "#25ee0dff$GPRMC,083950.180,A,2233.4249,N,11406.0046,E,0.00,315.00,251207,,,A*6E\r\n", "#25ee0dff$GPRMC,083955.180,A,2233.4249,N,11406.0046,E,0.00,315.00,251207,,,A*6E")); - verify(decoder.decode(null, null, - "#353686009063310#353686009063310#0000#AUTO#2\r\n" + - "#239757a9$GPRMC,150252.001,A,2326.6856,S,4631.8154,W,,,260513,,,A*52\r\n" + + verifyPositions(decoder, text( + "#353686009063310#353686009063310#0000#AUTO#2\r\n", + "#239757a9$GPRMC,150252.001,A,2326.6856,S,4631.8154,W,,,260513,,,A*52\r\n", "#239757a9$GPRMC,150322.001,A,2326.6854,S,4631.8157,W,,,260513,,,A*55")); - verify(decoder.decode(null, null, - "#357671031289215#V600#0000#AUTOLOW#1\r\n" + + verifyPositions(decoder, text( + "#357671031289215#V600#0000#AUTOLOW#1\r\n", "#00735e1c$GPRMC,115647.000,A,5553.6524,N,02632.3128,E,0.00,0.0,130614,0.0,W,A*28")); } |