aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2016-02-17 07:50:08 +1100
committerAnton Tananaev <anton.tananaev@gmail.com>2016-02-17 07:50:08 +1100
commit513de76c622f743b7ed257d1a956666d575dd6f3 (patch)
tree29e356419cf790cedefc0e99d580cedfedfd8edd
parente4e4bad2d525b9a575fd8332441b7463267ee7c1 (diff)
downloadtrackermap-server-513de76c622f743b7ed257d1a956666d575dd6f3.tar.gz
trackermap-server-513de76c622f743b7ed257d1a956666d575dd6f3.tar.bz2
trackermap-server-513de76c622f743b7ed257d1a956666d575dd6f3.zip
Add new Totem unit test case
-rw-r--r--test/org/traccar/ProtocolTest.java2
-rw-r--r--test/org/traccar/protocol/TotemProtocolDecoderTest.java3
2 files changed, 4 insertions, 1 deletions
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(