diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2015-11-25 09:20:01 +1300 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2015-11-25 09:20:01 +1300 |
commit | 9e5de36d24d477bddc7addc29f4b504314b644cf (patch) | |
tree | 1f3c924c60f44d79ae7dcd7497257ce647ba3707 /test/org/traccar/ProtocolDecoderTest.java | |
parent | fcdea01510dc9bf7144c76f4dd3a08c8c4eebaca (diff) | |
download | trackermap-server-9e5de36d24d477bddc7addc29f4b504314b644cf.tar.gz trackermap-server-9e5de36d24d477bddc7addc29f4b504314b644cf.tar.bz2 trackermap-server-9e5de36d24d477bddc7addc29f4b504314b644cf.zip |
Support Teltonika messages without location
Diffstat (limited to 'test/org/traccar/ProtocolDecoderTest.java')
-rw-r--r-- | test/org/traccar/ProtocolDecoderTest.java | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/test/org/traccar/ProtocolDecoderTest.java b/test/org/traccar/ProtocolDecoderTest.java index 8f7ed628b..5d2acdda1 100644 --- a/test/org/traccar/ProtocolDecoderTest.java +++ b/test/org/traccar/ProtocolDecoderTest.java @@ -119,21 +119,25 @@ public class ProtocolDecoderTest { } protected void verifyPositions(BaseProtocolDecoder decoder, Object object) throws Exception { - verifyDecodedList(decoder.decode(null, null, object), null); + verifyDecodedList(decoder.decode(null, null, object), true, null); + } + + protected void verifyPositions(BaseProtocolDecoder decoder, boolean checkLocation, Object object) throws Exception { + verifyDecodedList(decoder.decode(null, null, object), checkLocation, null); } protected void verifyPositions(BaseProtocolDecoder decoder, Object object, Position position) throws Exception { - verifyDecodedList(decoder.decode(null, null, object), position); + verifyDecodedList(decoder.decode(null, null, object), true, position); } - private void verifyDecodedList(Object decodedObject, Position expected) { + private void verifyDecodedList(Object decodedObject, boolean checkLocation, Position expected) { Assert.assertNotNull("list is null", decodedObject); Assert.assertTrue("not a list", decodedObject instanceof List); Assert.assertFalse("list if empty", ((List) decodedObject).isEmpty()); for (Object item : (List) decodedObject) { - verifyDecodedPosition(item, true, false, expected); + verifyDecodedPosition(item, checkLocation, false, expected); } } |