aboutsummaryrefslogtreecommitdiff
path: root/test/org/traccar/protocol/Gt06FrameDecoderTest.java
diff options
context:
space:
mode:
Diffstat (limited to 'test/org/traccar/protocol/Gt06FrameDecoderTest.java')
-rw-r--r--test/org/traccar/protocol/Gt06FrameDecoderTest.java24
1 files changed, 24 insertions, 0 deletions
diff --git a/test/org/traccar/protocol/Gt06FrameDecoderTest.java b/test/org/traccar/protocol/Gt06FrameDecoderTest.java
new file mode 100644
index 000000000..9a4c709e8
--- /dev/null
+++ b/test/org/traccar/protocol/Gt06FrameDecoderTest.java
@@ -0,0 +1,24 @@
+package org.traccar.protocol;
+
+import org.junit.Assert;
+import org.junit.Test;
+import org.traccar.ProtocolTest;
+
+public class Gt06FrameDecoderTest extends ProtocolTest {
+
+ @Test
+ public void testDecode() throws Exception {
+
+ Gt06FrameDecoder decoder = new Gt06FrameDecoder();
+
+ Assert.assertEquals(
+ binary("78780d010352887071911998000479d00d0a"),
+ decoder.decode(null, null, binary("78780d010352887071911998000479d00d0a")));
+
+ Assert.assertEquals(
+ binary("78782516000000000000c000000000000000000020000900fa0210ef00fb620006640301000468030d0a"),
+ decoder.decode(null, null, binary("78782516000000000000c000000000000000000020000900fa0210ef00fb620006640301000468030d0a")));
+
+ }
+
+}