aboutsummaryrefslogtreecommitdiff
path: root/test/org/traccar/ProtocolDecoderTest.java
diff options
context:
space:
mode:
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();