aboutsummaryrefslogtreecommitdiff
path: root/src/test/java
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/java')
-rw-r--r--src/test/java/org/traccar/protocol/HuabaoFrameEncoderTest.java21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/test/java/org/traccar/protocol/HuabaoFrameEncoderTest.java b/src/test/java/org/traccar/protocol/HuabaoFrameEncoderTest.java
new file mode 100644
index 000000000..a2799e9a8
--- /dev/null
+++ b/src/test/java/org/traccar/protocol/HuabaoFrameEncoderTest.java
@@ -0,0 +1,21 @@
+package org.traccar.protocol;
+
+import io.netty.buffer.ByteBuf;
+import io.netty.buffer.Unpooled;
+import org.junit.jupiter.api.Test;
+import org.traccar.ProtocolTest;
+
+public class HuabaoFrameEncoderTest extends ProtocolTest {
+
+ @Test
+ public void testDecode() throws Exception {
+
+ var encoder = new HuabaoFrameEncoder();
+
+ ByteBuf buf = Unpooled.buffer();
+ encoder.encode(null, binary("7e307e087d557e"), buf);
+ verifyFrame(binary("7e307d02087d01557e"), buf);
+
+ }
+
+}