Create AbstractByteBufTest for ByteBufAdaptor
There are a number of test failures that needs to be looked at, still.
This commit is contained in:
parent
8d31917bc6
commit
2f9aabc915
7
pom.xml
7
pom.xml
@ -394,6 +394,13 @@
|
|||||||
<version>${netty.build.version}</version>
|
<version>${netty.build.version}</version>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>io.netty</groupId>
|
||||||
|
<artifactId>netty-buffer</artifactId>
|
||||||
|
<version>${netty.version}</version>
|
||||||
|
<type>test-jar</type>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>io.netty</groupId>
|
<groupId>io.netty</groupId>
|
||||||
<artifactId>netty-handler</artifactId>
|
<artifactId>netty-handler</artifactId>
|
||||||
|
@ -0,0 +1,25 @@
|
|||||||
|
package io.netty.buffer.api.adaptor;
|
||||||
|
|
||||||
|
import io.netty.buffer.AbstractByteBufTest;
|
||||||
|
import io.netty.buffer.ByteBuf;
|
||||||
|
import org.junit.AfterClass;
|
||||||
|
import org.junit.BeforeClass;
|
||||||
|
|
||||||
|
public class ByteBufAdaptorTest extends AbstractByteBufTest {
|
||||||
|
static ByteBufAllocatorAdaptor alloc;
|
||||||
|
|
||||||
|
@BeforeClass
|
||||||
|
public static void setUpAllocator() {
|
||||||
|
alloc = new ByteBufAllocatorAdaptor();
|
||||||
|
}
|
||||||
|
|
||||||
|
@AfterClass
|
||||||
|
public static void tearDownAllocator() throws Exception {
|
||||||
|
alloc.close();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected ByteBuf newBuffer(int capacity, int maxCapacity) {
|
||||||
|
return alloc.buffer(capacity, capacity);
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user