aboutsummaryrefslogtreecommitdiff
path: root/test/org/traccar/protocol/BoxProtocolDecoderTest.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2015-10-22 15:26:17 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2015-10-22 15:26:17 +1300
commit1ca95d099df96d576a0eaddc6e42b5b41aed3e06 (patch)
tree65ae84eb5e301317263fd72c31cc54922c71eb96 /test/org/traccar/protocol/BoxProtocolDecoderTest.java
parent122a26d2822f35b27b9cb0b217916d6b821d9654 (diff)
downloadtrackermap-server-1ca95d099df96d576a0eaddc6e42b5b41aed3e06.tar.gz
trackermap-server-1ca95d099df96d576a0eaddc6e42b5b41aed3e06.tar.bz2
trackermap-server-1ca95d099df96d576a0eaddc6e42b5b41aed3e06.zip
Refactor protocol unit testing
Diffstat (limited to 'test/org/traccar/protocol/BoxProtocolDecoderTest.java')
-rw-r--r--test/org/traccar/protocol/BoxProtocolDecoderTest.java36
1 files changed, 18 insertions, 18 deletions
diff --git a/test/org/traccar/protocol/BoxProtocolDecoderTest.java b/test/org/traccar/protocol/BoxProtocolDecoderTest.java
index 9aacc85f0..86013e9f8 100644
--- a/test/org/traccar/protocol/BoxProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/BoxProtocolDecoderTest.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 BoxProtocolDecoderTest extends ProtocolDecoderTest {
@@ -11,52 +11,52 @@ public class BoxProtocolDecoderTest extends ProtocolDecoderTest {
BoxProtocolDecoder decoder = new BoxProtocolDecoder(new BoxProtocol());
- assertNull(decoder.decode(null, null,
+ verifyNothing(decoder, text(
"H,BT,358281002435893,081028142432,F5813D19,6D6E6DC2"));
- assertNull(decoder.decode(null, null,
+ verifyNothing(decoder, text(
"H,BT,N878123,080415081234,D63E6DD9,6D6E6DC2,8944100300825505377"));
- verify(decoder.decode(null, null,
+ verifyPosition(decoder, text(
"L,081028142429,G,52.51084,-1.70849,0,170,0,1,0"));
- verify(decoder.decode(null, null,
+ verifyPosition(decoder, text(
"L,081028142432,G,52.51081,-1.70849,0,203,0,16,0"));
- assertNull(decoder.decode(null, null,
+ verifyNothing(decoder, text(
"L,080528112501,AI1,145.56"));
- assertNull(decoder.decode(null, null,
+ verifyNothing(decoder, text(
"E,1"));
- verify(decoder.decode(null, null,
+ verifyPosition(decoder, text(
"L,150728150130,G,24.68312,46.67526,0,140,0,3,20;A,0;D,0;I,0"));
- verify(decoder.decode(null, null,
+ verifyPosition(decoder, text(
"L,150728155815,G,24.68311,46.67528,0,140,0,6,21;A,0;D,0;I,0"));
- verify(decoder.decode(null, null,
+ verifyPosition(decoder, text(
"L,150728155833,G,24.68311,46.67528,11,140,0,52,23;A,0.79;D,0;I,0"));
- verify(decoder.decode(null, null,
+ verifyPosition(decoder, text(
"L,150728155934,G,24.68396,46.67489,0,282,0.12,1,21;A,1.27;D,1.23;I,0"));
- verify(decoder.decode(null, null,
+ verifyPosition(decoder, text(
"L,150728160033,G,24.68414,46.67485,0,282,0.12,1,21;A,0;D,0;I,0"));
- verify(decoder.decode(null, null,
+ verifyPosition(decoder, text(
"L,150728160133,G,24.68388,46.675,0,282,0.12,1,21;A,0;D,0;I,0"));
- verify(decoder.decode(null, null,
+ verifyPosition(decoder, text(
"L,150728160233,G,24.68377,46.67501,0,282,0.12,1,21;A,0;D,0;I,0"));
- verify(decoder.decode(null, null,
+ verifyPosition(decoder, text(
"L,150728160333,G,24.684,46.67488,0,282,0.12,1,21;A,0;D,0;I,0"));
- verify(decoder.decode(null, null,
+ verifyPosition(decoder, text(
"L,150728155855,G,24.68413,46.67482,0,282,0.14,53,21;A,0;D,0;I,0"));
- verify(decoder.decode(null, null,
+ verifyPosition(decoder, text(
"L,150728160400,G,24.68413,46.67482,0,282,0.14,7,20;A,0;D,0;I,0;END,25,326,150728155814"));
}