diff options
Diffstat (limited to 'test/org')
-rw-r--r-- | test/org/traccar/ProtocolTest.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/org/traccar/ProtocolTest.java b/test/org/traccar/ProtocolTest.java index c9d4ceeb2..a1b14c74d 100644 --- a/test/org/traccar/ProtocolTest.java +++ b/test/org/traccar/ProtocolTest.java @@ -192,6 +192,10 @@ public class ProtocolTest extends BaseTest { Assert.assertTrue(attributes.get(Position.KEY_FUEL_LEVEL) instanceof Number); } + if (attributes.containsKey(Position.KEY_POWER)) { + Assert.assertTrue(attributes.get(Position.KEY_POWER) instanceof Number); + } + if (attributes.containsKey(Position.KEY_BATTERY)) { Assert.assertTrue(attributes.get(Position.KEY_BATTERY) instanceof Number); } @@ -201,6 +205,10 @@ public class ProtocolTest extends BaseTest { Assert.assertTrue(batteryLevel <= 100 && batteryLevel >= 0); } + if (attributes.containsKey(Position.KEY_CHARGE)) { + Assert.assertTrue(attributes.get(Position.KEY_CHARGE) instanceof Boolean); + } + if (position.getNetwork() != null && position.getNetwork().getCellTowers() != null) { for (CellTower cellTower : position.getNetwork().getCellTowers()) { checkInteger(cellTower.getMobileCountryCode(), 0, 999); |