diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2017-03-04 13:28:03 +1300 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2017-03-04 13:28:03 +1300 |
commit | 1423209d00804948110e1b70c2e41248b4945877 (patch) | |
tree | 4529df0b6c3398126433f049baf5da7450a62e5f /test/org/traccar | |
parent | b29929c4c8f78f665dd1614e43ee108c6eeeaa89 (diff) | |
download | trackermap-server-1423209d00804948110e1b70c2e41248b4945877.tar.gz trackermap-server-1423209d00804948110e1b70c2e41248b4945877.tar.bz2 trackermap-server-1423209d00804948110e1b70c2e41248b4945877.zip |
Ensure that odometer is a number (fix #2967)
Diffstat (limited to 'test/org/traccar')
-rw-r--r-- | test/org/traccar/ProtocolTest.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/org/traccar/ProtocolTest.java b/test/org/traccar/ProtocolTest.java index f4072ad24..faf27071d 100644 --- a/test/org/traccar/ProtocolTest.java +++ b/test/org/traccar/ProtocolTest.java @@ -176,6 +176,10 @@ public class ProtocolTest extends BaseTest { Assert.assertFalse("no attributes", attributes.isEmpty()); } + if (attributes.containsKey(Position.KEY_ODOMETER)) { + Assert.assertTrue(attributes.get(Position.KEY_ODOMETER) instanceof Number); + } + if (position.getNetwork() != null && position.getNetwork().getCellTowers() != null) { for (CellTower cellTower : position.getNetwork().getCellTowers()) { checkInteger(cellTower.getMobileCountryCode(), 0, 999); |