blob: 16ff036b81cf22773d6dbbf309182f25f8c138ba (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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);
}
}
|