aboutsummaryrefslogtreecommitdiff
path: root/src/test/java/org/traccar/protocol/Gt02ProtocolDecoderTest.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/java/org/traccar/protocol/Gt02ProtocolDecoderTest.java')
-rw-r--r--src/test/java/org/traccar/protocol/Gt02ProtocolDecoderTest.java43
1 files changed, 43 insertions, 0 deletions
diff --git a/src/test/java/org/traccar/protocol/Gt02ProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/Gt02ProtocolDecoderTest.java
new file mode 100644
index 000000000..f9b8f6509
--- /dev/null
+++ b/src/test/java/org/traccar/protocol/Gt02ProtocolDecoderTest.java
@@ -0,0 +1,43 @@
+package org.traccar.protocol;
+
+import org.junit.Test;
+import org.traccar.ProtocolTest;
+
+public class Gt02ProtocolDecoderTest extends ProtocolTest {
+
+ @Test
+ public void testDecode() throws Exception {
+
+ Gt02ProtocolDecoder decoder = new Gt02ProtocolDecoder(null);
+
+ verifyAttributes(decoder, binary(
+ "6868150000035889905895258400831c07415045584f4b210d0a"));
+
+ verifyAttributes(decoder, binary(
+ "68682d0000035889905895258400951c1f415045584572726f723a20506172616d65746572203120284f4e2f4f4646290d0a"));
+
+ verifyAttributes(decoder, binary(
+ "68680f0504035889905831401700df1a00000d0a"));
+
+ verifyAttributes(decoder, binary(
+ "6868130504035889905831401700001a040423261e290d0a"));
+
+ verifyAttributes(decoder, binary(
+ "68681905040358899058314017000e1a010a2623211b2722252329000d0a"));
+
+ verifyAttributes(decoder, binary(
+ "68681a060303588990500037252de91a010a171a191b171915191e10000d0a"));
+
+ verifyPosition(decoder, binary(
+ "68682500000123456789012345000110010101010101026B3F3E026B3F3E000000000000000000010D0A"),
+ position("2001-01-01 01:01:01.000", true, -22.54610, -22.54610));
+
+ verifyAttributes(decoder, binary(
+ "6868110603035889905101276600001a0402292d0d0a"));
+
+ verifyPosition(decoder, binary(
+ "68682500a403588990510127660001100e09060a1d1b00ade1c90b79ea3000011b000000000000050d0a"));
+
+ }
+
+}