diff options
Diffstat (limited to 'test/org/traccar/helper/ChannelBufferToolsTest.java')
-rw-r--r-- | test/org/traccar/helper/ChannelBufferToolsTest.java | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/test/org/traccar/helper/ChannelBufferToolsTest.java b/test/org/traccar/helper/ChannelBufferToolsTest.java new file mode 100644 index 000000000..16ff036b8 --- /dev/null +++ b/test/org/traccar/helper/ChannelBufferToolsTest.java @@ -0,0 +1,23 @@ +package org.traccar.helper; + +import org.jboss.netty.buffer.ChannelBufferFactory; +import org.jboss.netty.buffer.HeapChannelBufferFactory; +import static org.junit.Assert.*; +import org.junit.Test; + +public class ChannelBufferToolsTest { + + private ChannelBufferFactory factory = new HeapChannelBufferFactory(); + + @Test + public void testFind() { + } + + @Test + public void testReadHexInteger() { + byte[] buf = {0x01,(byte)0x90,0x34}; + int result = ChannelBufferTools.readHexInteger( + factory.getBuffer(buf, 0, buf.length), 5); + assertEquals(1903, result); + } +} |