From 513de76c622f743b7ed257d1a956666d575dd6f3 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Wed, 17 Feb 2016 07:50:08 +1100 Subject: Add new Totem unit test case --- test/org/traccar/ProtocolTest.java | 2 +- test/org/traccar/protocol/TotemProtocolDecoderTest.java | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'test/org/traccar') diff --git a/test/org/traccar/ProtocolTest.java b/test/org/traccar/ProtocolTest.java index 75c12b171..d7104edba 100644 --- a/test/org/traccar/ProtocolTest.java +++ b/test/org/traccar/ProtocolTest.java @@ -194,7 +194,7 @@ public class ProtocolTest { if (attributes.containsKey(Event.KEY_LAC) || attributes.containsKey(Event.KEY_CID)) { checkInteger(attributes.get(Event.KEY_LAC), 1, 65535); - checkInteger(attributes.get(Event.KEY_CID), 1, 268435455); + checkInteger(attributes.get(Event.KEY_CID), 0, 268435455); } if (attributes.containsKey(Event.KEY_MCC) || attributes.containsKey(Event.KEY_MNC)) { diff --git a/test/org/traccar/protocol/TotemProtocolDecoderTest.java b/test/org/traccar/protocol/TotemProtocolDecoderTest.java index de554b7bc..237e77612 100644 --- a/test/org/traccar/protocol/TotemProtocolDecoderTest.java +++ b/test/org/traccar/protocol/TotemProtocolDecoderTest.java @@ -10,6 +10,9 @@ public class TotemProtocolDecoderTest extends ProtocolTest { TotemProtocolDecoder decoder = new TotemProtocolDecoder(new TotemProtocol()); + verifyPosition(decoder, text( + "$$0108AA863835024426319|18004000160216160756411100007DCD0000111000000000.800000000316.3519N10228.5086E126522")); + // $$0128AA867521029231005|1880100015101802314842140000000000000000000000001AB48366093127600000.900000000806.1947N09818.4795E080355 verifyPosition(decoder, text( -- cgit v1.2.3