aboutsummaryrefslogtreecommitdiff
path: root/test/org/traccar/ProtocolTest.java
diff options
context:
space:
mode:
authorGavriel Fleischer <flocsy@gmail.com>2019-02-17 01:24:44 +0200
committerGavriel Fleischer <flocsy@gmail.com>2019-02-17 01:24:44 +0200
commit4b9aa8e7c98a3420a698b1520ee63060409c7d88 (patch)
tree8598434570526fe27d832271a155e8a47f154fef /test/org/traccar/ProtocolTest.java
parentc1de08db7773eef6b1ed4a6e2b62f15d1df6a2a5 (diff)
downloadtrackermap-server-4b9aa8e7c98a3420a698b1520ee63060409c7d88.tar.gz
trackermap-server-4b9aa8e7c98a3420a698b1520ee63060409c7d88.tar.bz2
trackermap-server-4b9aa8e7c98a3420a698b1520ee63060409c7d88.zip
binary encoder + test
Diffstat (limited to 'test/org/traccar/ProtocolTest.java')
-rw-r--r--test/org/traccar/ProtocolTest.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/org/traccar/ProtocolTest.java b/test/org/traccar/ProtocolTest.java
index 1b5c0ea00..181af885d 100644
--- a/test/org/traccar/ProtocolTest.java
+++ b/test/org/traccar/ProtocolTest.java
@@ -52,6 +52,14 @@ public class ProtocolTest extends BaseTest {
return builder.toString();
}
+ protected ByteBuf concatenateBuffers(ByteBuf... buffers) {
+ ByteBuf result = Unpooled.buffer();
+ for (ByteBuf buf : buffers) {
+ result.writeBytes(buf);
+ }
+ return result;
+ }
+
protected ByteBuf binary(String... data) {
return Unpooled.wrappedBuffer(DataConverter.parseHex(concatenateStrings(data)));
}