aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2015-07-01 11:04:03 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2015-07-01 11:04:03 +1200
commitc099628f0cd07ca6545773a69824b567a6610675 (patch)
tree52319ee2fc4667cf1566f3b4bed21b9780b8b005 /test
parentd6662317306b79717f9d3a1df30fc83cb87866ce (diff)
downloadtrackermap-server-c099628f0cd07ca6545773a69824b567a6610675.tar.gz
trackermap-server-c099628f0cd07ca6545773a69824b567a6610675.tar.bz2
trackermap-server-c099628f0cd07ca6545773a69824b567a6610675.zip
Add byte array conversion method
Diffstat (limited to 'test')
-rw-r--r--test/org/traccar/helper/ChannelBufferToolsTest.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/test/org/traccar/helper/ChannelBufferToolsTest.java b/test/org/traccar/helper/ChannelBufferToolsTest.java
index 67c58058b..90f5e82ae 100644
--- a/test/org/traccar/helper/ChannelBufferToolsTest.java
+++ b/test/org/traccar/helper/ChannelBufferToolsTest.java
@@ -34,7 +34,12 @@ public class ChannelBufferToolsTest {
@Test
public void convertHexStringTest() {
- assertArrayEquals(ChannelBufferTools.convertHexString("1234"), new byte[] {0x12,0x34});
+ assertArrayEquals(new byte[] {0x12,0x34}, ChannelBufferTools.convertHexString("1234"));
+ }
+
+ @Test
+ public void convertHexByteArray() {
+ assertEquals("1234", ChannelBufferTools.convertByteArray(new byte[] {0x12,0x34}));
}
}