From 9e5de36d24d477bddc7addc29f4b504314b644cf Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Wed, 25 Nov 2015 09:20:01 +1300 Subject: Support Teltonika messages without location --- test/org/traccar/ProtocolDecoderTest.java | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'test/org/traccar/ProtocolDecoderTest.java') 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); } } -- cgit v1.2.3