aboutsummaryrefslogtreecommitdiff
path: root/test/org/traccar/ProtocolDecoderTest.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2015-10-30 17:03:51 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2015-10-30 17:03:51 +1300
commit6cec14dfbbf59e14efd43ab147e70b9f5803aec5 (patch)
tree7a4ec847120825343917ff7d22edd27a53dc37da /test/org/traccar/ProtocolDecoderTest.java
parentb14974fec3c529e4cc29db6f86372efddc87b959 (diff)
downloadtrackermap-server-6cec14dfbbf59e14efd43ab147e70b9f5803aec5.tar.gz
trackermap-server-6cec14dfbbf59e14efd43ab147e70b9f5803aec5.tar.bz2
trackermap-server-6cec14dfbbf59e14efd43ab147e70b9f5803aec5.zip
Add Megastek unit test case
Diffstat (limited to 'test/org/traccar/ProtocolDecoderTest.java')
-rw-r--r--test/org/traccar/ProtocolDecoderTest.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/org/traccar/ProtocolDecoderTest.java b/test/org/traccar/ProtocolDecoderTest.java
index e52ea4695..df8eb4e10 100644
--- a/test/org/traccar/ProtocolDecoderTest.java
+++ b/test/org/traccar/ProtocolDecoderTest.java
@@ -154,6 +154,15 @@ public class ProtocolDecoderTest {
Assert.assertEquals("latitude", expected.getLatitude(), position.getLatitude(), 0.00001);
Assert.assertEquals("longitude", expected.getLongitude(), position.getLongitude(), 0.00001);
+ Assert.assertTrue("altitude >= -12262", position.getAltitude() >= -12262);
+ Assert.assertTrue("altitude <= 18000", position.getAltitude() <= 18000);
+
+ Assert.assertTrue("speed >= 0", position.getSpeed() >= 0);
+ Assert.assertTrue("speed <= 869", position.getSpeed() <= 869);
+
+ Assert.assertTrue("course >= 0", position.getCourse() >= 0);
+ Assert.assertTrue("course <= 360", position.getCourse() <= 360);
+
}
private void verifyDecodedPosition(Object decodedObject) {