From 0f2a1c47fd62aeeae8e4513280e2950fdf596cf6 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Fri, 6 Jan 2017 21:59:44 +1300 Subject: Implement TZ AVL05 protocol (fix #2751) --- test/org/traccar/ProtocolTest.java | 3 +++ test/org/traccar/protocol/TzoneProtocolDecoderTest.java | 6 ++++++ 2 files changed, 9 insertions(+) (limited to 'test') diff --git a/test/org/traccar/ProtocolTest.java b/test/org/traccar/ProtocolTest.java index 43be1a59e..20e033e3b 100644 --- a/test/org/traccar/ProtocolTest.java +++ b/test/org/traccar/ProtocolTest.java @@ -154,6 +154,9 @@ public class ProtocolTest extends BaseTest { Assert.assertTrue("latitude >= -90", position.getLatitude() >= -90); Assert.assertTrue("latitude <= 90", position.getLatitude() <= 90); + Assert.assertTrue("longitude >= -180", position.getLongitude() >= -180); + Assert.assertTrue("longitude <= 180", position.getLongitude() <= 180); + } Assert.assertTrue("altitude >= -12262", position.getAltitude() >= -12262); diff --git a/test/org/traccar/protocol/TzoneProtocolDecoderTest.java b/test/org/traccar/protocol/TzoneProtocolDecoderTest.java index 2ae776f36..08a36ec64 100644 --- a/test/org/traccar/protocol/TzoneProtocolDecoderTest.java +++ b/test/org/traccar/protocol/TzoneProtocolDecoderTest.java @@ -11,6 +11,12 @@ public class TzoneProtocolDecoderTest extends ProtocolTest { TzoneProtocolDecoder decoder = new TzoneProtocolDecoder(new TzoneProtocol()); + verifyPosition(decoder, binary( + "545a005024240153011000000863835025559464110103080a22001609011bed79245964a9110103080a22000a0000550c00000604396f04222c000daac000151701a204870000000000000003000959000546190d0a")); + + verifyPosition(decoder, binary( + "545A005224240153010E000008638350256668551008130616090016050079F63D2527FAF710081306160900A000002F0D33000803015B07013D7976000DAAE0400537016C049E000000000000000300800002B65EEA0D0A")); + verifyPosition(decoder, binary( "545a00582424010b022000000860041028904798100803030c2700160a007da96203356669100803030c2700000000000e000004002813730010aa4000000617017100000000000080000000000000000000000000000000007701fe0d0a")); -- cgit v1.2.3