diff options
author | user <user@laptop.(none)> | 2012-10-21 17:44:59 +1300 |
---|---|---|
committer | user <user@laptop.(none)> | 2012-10-21 17:44:59 +1300 |
commit | a3441d3bcd02ec48e408957dfdc61dc6850bc339 (patch) | |
tree | b62cd0cd31b7deb2e6c4360e5a4d2cbcba55acc4 /test/org/traccar/helper/ChannelBufferToolsTest.java | |
parent | f5bb85ff12db673ecc30f5cbaddc3b43a9d3310b (diff) | |
download | trackermap-server-a3441d3bcd02ec48e408957dfdc61dc6850bc339.tar.gz trackermap-server-a3441d3bcd02ec48e408957dfdc61dc6850bc339.tar.bz2 trackermap-server-a3441d3bcd02ec48e408957dfdc61dc6850bc339.zip |
Add JT600 support (fix #58)
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); + } +} |