aboutsummaryrefslogtreecommitdiff
path: root/test/org
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2015-10-25 22:09:23 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2015-10-25 22:09:23 +1300
commit72c1c67bfb63437dea9fde94ae7627fa6d46bdfe (patch)
tree99e27c25e60d5bc36cbebd605bba22d54d802b86 /test/org
parent45c1ae8b8d8ae0496cf765b21c20a4f2f0087fd7 (diff)
downloadtraccar-server-72c1c67bfb63437dea9fde94ae7627fa6d46bdfe.tar.gz
traccar-server-72c1c67bfb63437dea9fde94ae7627fa6d46bdfe.tar.bz2
traccar-server-72c1c67bfb63437dea9fde94ae7627fa6d46bdfe.zip
Minor changes to buffer tools test
Diffstat (limited to 'test/org')
-rw-r--r--test/org/traccar/helper/ChannelBufferToolsTest.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/test/org/traccar/helper/ChannelBufferToolsTest.java b/test/org/traccar/helper/ChannelBufferToolsTest.java
index 2d1c1f0ca..744d3eb43 100644
--- a/test/org/traccar/helper/ChannelBufferToolsTest.java
+++ b/test/org/traccar/helper/ChannelBufferToolsTest.java
@@ -1,6 +1,8 @@
package org.traccar.helper;
+import org.jboss.netty.buffer.ChannelBuffer;
import org.jboss.netty.buffer.ChannelBufferFactory;
+import org.jboss.netty.buffer.ChannelBuffers;
import org.jboss.netty.buffer.HeapChannelBufferFactory;
import static org.junit.Assert.*;
import org.junit.Test;
@@ -13,7 +15,7 @@ public class ChannelBufferToolsTest {
public void testReadHexInteger() {
byte[] buf = {0x01, (byte) 0x90, 0x34};
int result = ChannelBufferTools.readHexInteger(
- factory.getBuffer(buf, 0, buf.length), 5);
+ ChannelBuffers.wrappedBuffer(buf), 5);
assertEquals(1903, result);
}
@@ -21,7 +23,7 @@ public class ChannelBufferToolsTest {
public void testReadHexString() {
byte[] buf = {0x01, (byte) 0x90, 0x34};
String result = ChannelBufferTools.readHexString(
- factory.getBuffer(buf, 0, buf.length), 5);
+ ChannelBuffers.wrappedBuffer(buf), 5);
assertEquals("01903", result);
result = String.valueOf(Long.parseLong(result));