aboutsummaryrefslogtreecommitdiff
path: root/test/org/traccar/ProtocolDecoderTest.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2015-10-28 13:51:58 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2015-10-28 13:51:58 +1300
commit6e594f07b8f1236e000952601ce2d6ff7aa0575a (patch)
tree2d5181b90032762bef6e5789562e785b5598dea9 /test/org/traccar/ProtocolDecoderTest.java
parentba1ce052ba5ed33a1110448f5857e8e7e2e101d0 (diff)
downloadtrackermap-server-6e594f07b8f1236e000952601ce2d6ff7aa0575a.tar.gz
trackermap-server-6e594f07b8f1236e000952601ce2d6ff7aa0575a.tar.bz2
trackermap-server-6e594f07b8f1236e000952601ce2d6ff7aa0575a.zip
Refactor TLT-2H protocol decoder
Diffstat (limited to 'test/org/traccar/ProtocolDecoderTest.java')
-rw-r--r--test/org/traccar/ProtocolDecoderTest.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/org/traccar/ProtocolDecoderTest.java b/test/org/traccar/ProtocolDecoderTest.java
index 564ecb751..61c333d67 100644
--- a/test/org/traccar/ProtocolDecoderTest.java
+++ b/test/org/traccar/ProtocolDecoderTest.java
@@ -74,6 +74,15 @@ public class ProtocolDecoderTest {
}
}
+ protected void verifyPositions(BaseProtocolDecoder decoder, Object object, Position position) throws Exception {
+ Object decodedObject = decoder.decode(null, null, object);
+ Assert.assertNotNull(decodedObject);
+ Assert.assertTrue(decodedObject instanceof List);
+ for (Object item : (List) decodedObject) {
+ verifyDecodedPosition(item, position);
+ }
+ }
+
protected Position position(String time, boolean valid, double lat, double lon) throws ParseException {
Position position = new Position();