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/Gl100ProtocolDecoderTest.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/Gl100ProtocolDecoderTest.java')
-rw-r--r-- | test/org/traccar/protocol/Gl100ProtocolDecoderTest.java | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/test/org/traccar/protocol/Gl100ProtocolDecoderTest.java b/test/org/traccar/protocol/Gl100ProtocolDecoderTest.java index 0755fea5a..52c331f13 100644 --- a/test/org/traccar/protocol/Gl100ProtocolDecoderTest.java +++ b/test/org/traccar/protocol/Gl100ProtocolDecoderTest.java @@ -1,8 +1,8 @@ package org.traccar.protocol; -import static org.junit.Assert.assertNull; -import static org.traccar.helper.DecoderVerifier.verify; + import org.junit.Test; +import org.traccar.ProtocolDecoderTest; public class Gl100ProtocolDecoderTest extends ProtocolDecoderTest { @@ -11,31 +11,31 @@ public class Gl100ProtocolDecoderTest extends ProtocolDecoderTest { Gl100ProtocolDecoder decoder = new Gl100ProtocolDecoder(new Gl100Protocol()); - assertNull(decoder.decode(null, null, + verifyNothing(decoder, text( "AT+GTHBD=HeartBeat,359231030000010,20090101000000,11F0,0102120204")); - verify(decoder.decode(null, null, + verifyPosition(decoder, text( "+RESP:GTSOS,359231030000010,0,0,0,1,4.3,92,70.0,1,121.354335,31.222073,20090101000000,0460,0000,18d8,6141,00,11F0,0102120204")); - verify(decoder.decode(null, null, + verifyPosition(decoder, text( "+RESP:GTRTL,359231030000010,0,0,0,1,4.3,92,70.0,1,121.354335,31.222073,20090101000000,0460,0000,18d8,6141,00,11F0,0102120204")); - verify(decoder.decode(null, null, + verifyPosition(decoder, text( "+RESP:GTEST,359231030000010,0,0,0,1,4.3,92,70.0,1,121.354335,31.222073,20090101000000,0460,0000,18d8,6141,00,11F0,0102120204")); - verify(decoder.decode(null, null, + verifyPosition(decoder, text( "+RESP:GTSZI,359231030000010,0,3,0,1,4.3,92,70.0,1,121.354335,31.222073,20090101000000,0460,0000,18d8,6141,00,11F0,0102120204")); - verify(decoder.decode(null, null, + verifyPosition(decoder, text( "+RESP:GTLBC,359231030000010,02132523415,1,4.3,92,70.0,1,121.354335,31.222073,20090101000000,0460,0000,18d8,6141,00,11F0,0102120204")); - verify(decoder.decode(null, null, + verifyPosition(decoder, text( "+RESP:GTTRI,359231030000010,1,0,0,1,4.3,92,70.0,1,121.354335,31.222073,20090101000000,0460,0000,18d8,6141,00,11F0,0102120204")); - verify(decoder.decode(null, null, + verifyPosition(decoder, text( "+RESP:GTTRI,359231030000010,2,0,0,1,4.3,92,70.0,1,121.354335,31.222073,20090101000000,0460,0000,18d8,6141,00,0,0,1,-3.6,145,30.0,2,121.354442,31.221940,20090101000100,0460,0000,18d8,6141,00,11F0,0102120204")); - verify(decoder.decode(null, null, + verifyPosition(decoder, text( "+RESP:GTTRI,359464030073766,1,0,0,0,1.7,254,-27.8,3,30.474475,50.488383,20131107155511,0255,0003,6995,4761,00,0071,0103090402")); } |