aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2017-09-07 23:03:45 +1200
committerGitHub <noreply@github.com>2017-09-07 23:03:45 +1200
commit7294d12706466840562b073a5a58a3696c0e54da (patch)
treea3c474d75b2393149bd89a2a9b9580444ba00a61 /test
parentf0578c7b5f8737e019a9cf05935d2caaa940f0ca (diff)
parentee28d68243892623df7f718d50cd3ea5791f35ee (diff)
downloadtraccar-server-7294d12706466840562b073a5a58a3696c0e54da.tar.gz
traccar-server-7294d12706466840562b073a5a58a3696c0e54da.tar.bz2
traccar-server-7294d12706466840562b073a5a58a3696c0e54da.zip
Merge pull request #3511 from Abyss777/attributes_types
Handle correct and incorrect attribute types
Diffstat (limited to 'test')
-rw-r--r--test/org/traccar/ProtocolTest.java4
-rw-r--r--test/org/traccar/protocol/OsmAndProtocolDecoderTest.java3
2 files changed, 7 insertions, 0 deletions
diff --git a/test/org/traccar/ProtocolTest.java b/test/org/traccar/ProtocolTest.java
index a2c7e4f21..7bff41acd 100644
--- a/test/org/traccar/ProtocolTest.java
+++ b/test/org/traccar/ProtocolTest.java
@@ -241,6 +241,10 @@ public class ProtocolTest extends BaseTest {
Assert.assertTrue(attributes.get(Position.KEY_CHARGE) instanceof Boolean);
}
+ if (attributes.containsKey(Position.KEY_IGNITION)) {
+ Assert.assertTrue(attributes.get(Position.KEY_IGNITION) instanceof Boolean);
+ }
+
if (attributes.containsKey(Position.KEY_MOTION)) {
Assert.assertTrue(attributes.get(Position.KEY_MOTION) instanceof Boolean);
}
diff --git a/test/org/traccar/protocol/OsmAndProtocolDecoderTest.java b/test/org/traccar/protocol/OsmAndProtocolDecoderTest.java
index 2d0ef0adf..af860f371 100644
--- a/test/org/traccar/protocol/OsmAndProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/OsmAndProtocolDecoderTest.java
@@ -37,6 +37,9 @@ public class OsmAndProtocolDecoderTest extends ProtocolTest {
verifyPosition(decoder, request(
"/?id=123456&timestamp=1377177267&location=60.0,30.0"));
+ verifyPosition(decoder, request(
+ "/?id=123456789012345&timestamp=1504763810&lat=40.7232948571&lon=-74.0061408571&bearing=7.19889788244&speed=40&ignition=true&rpm=933&fuel=24"));
+
}
}