aboutsummaryrefslogtreecommitdiff
path: root/src/test/java/org/traccar/protocol/BceFrameDecoderTest.java
diff options
context:
space:
mode:
authorcasswarry0 <casswarry0@gmail.com>2023-01-17 17:14:53 -0700
committercasswarry0 <casswarry0@gmail.com>2023-01-17 17:14:53 -0700
commit7338b8730949ed027b3f8b31d7dca20687ebbb8b (patch)
treec2d171e6121818ab511460a786f69aab97a2a628 /src/test/java/org/traccar/protocol/BceFrameDecoderTest.java
parentcdecd3fa4427a382c0b09f8ad9d69ec14388960a (diff)
parent85501f9cf4918d5eee345f83aed7a31eecb26b8d (diff)
downloadtrackermap-server-7338b8730949ed027b3f8b31d7dca20687ebbb8b.tar.gz
trackermap-server-7338b8730949ed027b3f8b31d7dca20687ebbb8b.tar.bz2
trackermap-server-7338b8730949ed027b3f8b31d7dca20687ebbb8b.zip
Merge branch 'master' into develop
Diffstat (limited to 'src/test/java/org/traccar/protocol/BceFrameDecoderTest.java')
-rw-r--r--src/test/java/org/traccar/protocol/BceFrameDecoderTest.java26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/test/java/org/traccar/protocol/BceFrameDecoderTest.java b/src/test/java/org/traccar/protocol/BceFrameDecoderTest.java
new file mode 100644
index 000000000..e5a442f2f
--- /dev/null
+++ b/src/test/java/org/traccar/protocol/BceFrameDecoderTest.java
@@ -0,0 +1,26 @@
+package org.traccar.protocol;
+
+import org.junit.Test;
+import org.traccar.ProtocolTest;
+
+public class BceFrameDecoderTest extends ProtocolTest {
+
+ @Test
+ public void testDecode() throws Exception {
+
+ var decoder = inject(new BceFrameDecoder());
+
+ verifyNull(
+ decoder.decode(null, null, binary("23424345230d0a")));
+
+ verifyFrame(
+ binary("18ed450cf31403001501a5050a66207bde6442534451380a66207bde6440534451380a66207bde6414534451380a66207bde6416534451380a96207bde6415534451386247277bde03c0ffffc081400069f934418ce94b42001c88ee0000000000908c060103025d19ab004b0000000000000000000000000000000000000000000000000000000000000000000000000000000000000017b5c40000000000000001010000000aa6277bde008f5344513862b7277bde03c0ffffc081400051f8344185e94b420c1c85fa0000000000d18c060103025d19ab00470000000000000000000000000000000000000000000000000000000000000000000000000000000000000017b5c40000000000000001010400000ab6277bde009153445138a0"),
+ decoder.decode(null, null, binary("18ed450cf31403001501a5050a66207bde6442534451380a66207bde6440534451380a66207bde6414534451380a66207bde6416534451380a96207bde6415534451386247277bde03c0ffffc081400069f934418ce94b42001c88ee0000000000908c060103025d19ab004b0000000000000000000000000000000000000000000000000000000000000000000000000000000000000017b5c40000000000000001010000000aa6277bde008f5344513862b7277bde03c0ffffc081400051f8344185e94b420c1c85fa0000000000d18c060103025d19ab00470000000000000000000000000000000000000000000000000000000000000000000000000000000000000017b5c40000000000000001010400000ab6277bde009153445138a0")));
+
+ verifyFrame(
+ binary("18ed450cf31403000200a5070e"),
+ decoder.decode(null, null, binary("18ed450cf31403000200a5070e")));
+
+ }
+
+}