From 2449895139fa658d082c1085185003a001225bc3 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Mon, 20 Feb 2017 06:52:26 +1300 Subject: Implement TAIP protocol variant --- test/org/traccar/ProtocolTest.java | 2 +- test/org/traccar/protocol/TaipProtocolDecoderTest.java | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) (limited to 'test/org/traccar') diff --git a/test/org/traccar/ProtocolTest.java b/test/org/traccar/ProtocolTest.java index d4543a06d..f4072ad24 100644 --- a/test/org/traccar/ProtocolTest.java +++ b/test/org/traccar/ProtocolTest.java @@ -145,7 +145,7 @@ public class ProtocolTest extends BaseTest { } else { Assert.assertNotNull(position.getFixTime()); - Assert.assertTrue("year > 2000", position.getFixTime().after(new Date(946684800000L))); + Assert.assertTrue("year > 1999", position.getFixTime().after(new Date(915148800000L))); Assert.assertTrue("time < +25 hours", position.getFixTime().getTime() < System.currentTimeMillis() + 25 * 3600000); diff --git a/test/org/traccar/protocol/TaipProtocolDecoderTest.java b/test/org/traccar/protocol/TaipProtocolDecoderTest.java index 871ec84b3..74956f51c 100644 --- a/test/org/traccar/protocol/TaipProtocolDecoderTest.java +++ b/test/org/traccar/protocol/TaipProtocolDecoderTest.java @@ -10,6 +10,12 @@ public class TaipProtocolDecoderTest extends ProtocolTest { TaipProtocolDecoder decoder = new TaipProtocolDecoder(new TaipProtocol(), false); + verifyPosition(decoder, text( + ">RCQ09000000000000-3460365-058381460000007F0000000000000115000FFFF1099;#0000;ID=555224;*05<")); + + verifyPosition(decoder, text( + ">RBR00130217040848-3462200-05846708000175FF0022900003B3C13010800001118410+24061A;ID=555224;*07<")); + verifyPosition(decoder, text( ">REV451891352379+0307152+1016143700000012;SV=8;BL=4416;VO=8055;ID=356612026322000<")); -- cgit v1.2.3