aboutsummaryrefslogtreecommitdiff
path: root/test/org/traccar
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2016-02-17 22:10:52 +1100
committerAnton Tananaev <anton.tananaev@gmail.com>2016-02-17 22:10:52 +1100
commit6ea8778be3d7426fa9281f9260081e1863fae4bd (patch)
tree93a2fc3f814f01bcb2c28899612037747b2428d4 /test/org/traccar
parent2ce5a32a8cbcbb7d2e22f2912fa47f03b2d6b2fd (diff)
downloadtraccar-server-6ea8778be3d7426fa9281f9260081e1863fae4bd.tar.gz
traccar-server-6ea8778be3d7426fa9281f9260081e1863fae4bd.tar.bz2
traccar-server-6ea8778be3d7426fa9281f9260081e1863fae4bd.zip
Add GT06 frame decoder tests
Diffstat (limited to 'test/org/traccar')
-rw-r--r--test/org/traccar/protocol/Gt06FrameDecoderTest.java12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/org/traccar/protocol/Gt06FrameDecoderTest.java b/test/org/traccar/protocol/Gt06FrameDecoderTest.java
index 9a4c709e8..9ecd44e59 100644
--- a/test/org/traccar/protocol/Gt06FrameDecoderTest.java
+++ b/test/org/traccar/protocol/Gt06FrameDecoderTest.java
@@ -12,6 +12,18 @@ public class Gt06FrameDecoderTest extends ProtocolTest {
Gt06FrameDecoder decoder = new Gt06FrameDecoder();
Assert.assertEquals(
+ binary("78781f1210020e140613cc04770690003e3f2e3414b20000000000000000044c446a0d0a"),
+ decoder.decode(null, null, binary("78781f1210020e140613cc04770690003e3f2e3414b20000000000000000044c446a0d0a")));
+
+ Assert.assertNotEquals(
+ binary("787808134606020002044dc5050d0a"),
+ decoder.decode(null, null, binary("787808134606020002044dc5050d0a")));
+
+ Assert.assertEquals(
+ binary("78781f1210020e14061dcc0476fcd0003e3faf3e14b20000000000000000044ef6740d0a"),
+ decoder.decode(null, null, binary("78781f1210020e14061dcc0476fcd0003e3faf3e14b20000000000000000044ef6740d0a")));
+
+ Assert.assertEquals(
binary("78780d010352887071911998000479d00d0a"),
decoder.decode(null, null, binary("78780d010352887071911998000479d00d0a")));