aboutsummaryrefslogtreecommitdiff
path: root/test/org/traccar/protocol/IntellitracProtocolDecoderTest.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/IntellitracProtocolDecoderTest.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/IntellitracProtocolDecoderTest.java')
-rw-r--r--test/org/traccar/protocol/IntellitracProtocolDecoderTest.java35
1 files changed, 17 insertions, 18 deletions
diff --git a/test/org/traccar/protocol/IntellitracProtocolDecoderTest.java b/test/org/traccar/protocol/IntellitracProtocolDecoderTest.java
index d4f88e42d..9cba712bb 100644
--- a/test/org/traccar/protocol/IntellitracProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/IntellitracProtocolDecoderTest.java
@@ -1,8 +1,7 @@
package org.traccar.protocol;
-import static org.junit.Assert.assertNull;
import org.junit.Test;
-import static org.traccar.helper.DecoderVerifier.verify;
+import org.traccar.ProtocolDecoderTest;
public class IntellitracProtocolDecoderTest extends ProtocolDecoderTest {
@@ -11,51 +10,51 @@ public class IntellitracProtocolDecoderTest extends ProtocolDecoderTest {
IntellitracProtocolDecoder decoder = new IntellitracProtocolDecoder(new IntellitracProtocol());
- assertNull(decoder.decode(null, null, "$OK:TRACKING"));
+ verifyNothing(decoder, text( "$OK:TRACKING"));
- verify(decoder.decode(null, null,
+ verifyPosition(decoder, text(
"101000001,20100304075545,121.64547,25.06200,0,0,61,7,2,1,0,0.046,0.000,20100304075546,0"));
- verify(decoder.decode(null, null,
+ verifyPosition(decoder, text(
"1010000002,20030217132813,121.646060,25.061725,20,157,133,7,0,11,15,0.096,0.000"));
- verify(decoder.decode(null, null,
+ verifyPosition(decoder, text(
"1010000002,20030217132813,121.646060,25.061725,20,157,-133,7,0,11,15,0.096,0.000"));
- verify(decoder.decode(null, null,
+ verifyPosition(decoder, text(
"1001070919,20130405084206,37.903730,48.011377,0,0,235,10,2,2,0,20.211,0.153"));
- verify(decoder.decode(null, null,
+ verifyPosition(decoder, text(
"1010000002,20030217144230,121.646102,25.061398,0,0,139,0,0,0,0,0.093,0.000"));
- verify(decoder.decode(null, null,
+ verifyPosition(decoder, text(
"1010000004,20050513153524,121.646075,25.063675,0,166,50,6,1,0,0,0.118,0.000"));
- verify(decoder.decode(null, null,
+ verifyPosition(decoder, text(
"1010000004,20050513154001,121.646075,25.063675,0,166,55,7,1,0,0,0.096,0.000"));
- verify(decoder.decode(null, null,
+ verifyPosition(decoder, text(
"1010000002,20030217132813,121.646060,25.061725,20,157,0,7,0,11,15"));
- verify(decoder.decode(null, null,
+ verifyPosition(decoder, text(
"12345,1010000002,20030217132813,121.646060,25.061725,20,157,0,7,0,11,15"));
- verify(decoder.decode(null, null,
+ verifyPosition(decoder, text(
"1010000002,20030217144230,121.646102,25.061398,0,0,0,7,2,0,0"));
- verify(decoder.decode(null, null,
+ verifyPosition(decoder, text(
"$RP:12345,1010000002,20030217144230,121.646102,25.061398,0,0,0,7,2,0,0"));
- verify(decoder.decode(null, null,
+ verifyPosition(decoder, text(
"1010000001,20030105092129,121.651598,25.052325,0,0,33,0,1,0,0"));
- verify(decoder.decode(null, null,
+ verifyPosition(decoder, text(
"1010000001,20030105092129,-121.651598,-25.052325,0,0,33,0,1,0,0"));
- verify(decoder.decode(null, null,
+ verifyPosition(decoder, text(
"1015210962,20131010144712,-77.070037,-12.097935,0,0,77,7,2,2,0,0,139446.8,2095,20131010144712,,0.103,0.000"));
- verify(decoder.decode(null, null,
+ verifyPosition(decoder, text(
"1003269480,20131126100258,10.32989,49.93836,0,304,217,6,2,0,0,0.000,0.000,20131126100258,0,0,0,-40,0,0,-273,0,0,0,0"));
}