aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAbyss777 <abyss@fox5.ru>2017-05-22 10:42:10 +0500
committerAbyss777 <abyss@fox5.ru>2017-05-22 10:42:10 +0500
commit152e8f2e494275b1259601560abc22bcb39502c3 (patch)
treed828de08c9c2f7cabf671f6d75ddda459af77507 /test
parent0bafa34ebceba731aae2b45ae9e05c8f55b66b0e (diff)
downloadtraccar-server-152e8f2e494275b1259601560abc22bcb39502c3.tar.gz
traccar-server-152e8f2e494275b1259601560abc22bcb39502c3.tar.bz2
traccar-server-152e8f2e494275b1259601560abc22bcb39502c3.zip
Organize KEY_POWER and KEY_CHARGE using
Diffstat (limited to 'test')
-rw-r--r--test/org/traccar/ProtocolTest.java8
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);