aboutsummaryrefslogtreecommitdiff
path: root/test/org/traccar
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2018-09-27 15:15:29 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2018-09-27 15:15:29 +1200
commit38e77023844a5c76112ed79ddf8308cedfc3e099 (patch)
treed79c8583b15f7a66c5a7495f9f8c9c72d840c2f3 /test/org/traccar
parent61f82e3dce810d99bfdd02e6b7e66c6f617a13b5 (diff)
downloadtraccar-server-38e77023844a5c76112ed79ddf8308cedfc3e099.tar.gz
traccar-server-38e77023844a5c76112ed79ddf8308cedfc3e099.tar.bz2
traccar-server-38e77023844a5c76112ed79ddf8308cedfc3e099.zip
Fix Tramigo frame decoder
Diffstat (limited to 'test/org/traccar')
-rw-r--r--test/org/traccar/protocol/TramigoFrameDecoderTest.java23
1 files changed, 23 insertions, 0 deletions
diff --git a/test/org/traccar/protocol/TramigoFrameDecoderTest.java b/test/org/traccar/protocol/TramigoFrameDecoderTest.java
new file mode 100644
index 000000000..f482a00bb
--- /dev/null
+++ b/test/org/traccar/protocol/TramigoFrameDecoderTest.java
@@ -0,0 +1,23 @@
+package org.traccar.protocol;
+
+import org.junit.Test;
+import org.traccar.ProtocolTest;
+
+public class TramigoFrameDecoderTest extends ProtocolTest {
+
+ @Test
+ public void testDecode() throws Exception {
+
+ TramigoFrameDecoder decoder = new TramigoFrameDecoder();
+
+ verifyFrame(
+ binary("8000ed2bb0009c000101bee000050b09633d925b5472616d69676f3a205472697020737461727465642c2053686f636b2053656e736f722c206174204b696e6720437265656b20526f61642d46726565746f776e205374726565742c20506f727420486172636f7572742c205269766572732c204e472c20342e37363336312c20372e30313836382c2030373a31383a333620536570203320454f46"),
+ decoder.decode(null, null, binary("8000ed2bb0009c000101bee000050b09633d925b5472616d69676f3a205472697020737461727465642c2053686f636b2053656e736f722c206174204b696e6720437265656b20526f61642d46726565746f776e205374726565742c20506f727420486172636f7572742c205269766572732c204e472c20342e37363336312c20372e30313836382c2030373a31383a333620536570203320454f46")));
+
+ verifyFrame(
+ binary("80003d1ac0001c00010100000367152b13bc1d5970696e6720454f46"),
+ decoder.decode(null, null, binary("80003d1ac0001c00010100000367152b13bc1d5970696e6720454f46")));
+
+ }
+
+}