*ChannelBuffer* -> *ByteBuf* and ChannelBuffersTest -> UnpooledTest
This commit is contained in:
parent
7b6cbdbb1e
commit
ee9f30a2b9
@ -35,7 +35,7 @@ import static org.junit.Assert.*;
|
||||
/**
|
||||
* An abstract test class for channel buffers
|
||||
*/
|
||||
public abstract class AbstractChannelBufferTest {
|
||||
public abstract class AbstractByteBufTest {
|
||||
|
||||
private static final int CAPACITY = 4096; // Must be even
|
||||
private static final int BLOCK_SIZE = 128;
|
@ -28,12 +28,12 @@ import static org.junit.Assert.*;
|
||||
/**
|
||||
* An abstract test class for composite channel buffers
|
||||
*/
|
||||
public abstract class AbstractCompositeChannelBufferTest extends
|
||||
AbstractChannelBufferTest {
|
||||
public abstract class AbstractCompositeByteBufTest extends
|
||||
AbstractByteBufTest {
|
||||
|
||||
private final ByteOrder order;
|
||||
|
||||
protected AbstractCompositeChannelBufferTest(ByteOrder order) {
|
||||
protected AbstractCompositeByteBufTest(ByteOrder order) {
|
||||
if (order == null) {
|
||||
throw new NullPointerException("order");
|
||||
}
|
@ -19,8 +19,8 @@ package io.netty.buffer;
|
||||
/**
|
||||
* Tests big-endian composite channel buffers
|
||||
*/
|
||||
public class BigEndianCompositeChannelBufferTest extends AbstractCompositeChannelBufferTest {
|
||||
public BigEndianCompositeChannelBufferTest() {
|
||||
public class BigEndianCompositeByteBufTest extends AbstractCompositeByteBufTest {
|
||||
public BigEndianCompositeByteBufTest() {
|
||||
super(Unpooled.BIG_ENDIAN);
|
||||
}
|
||||
}
|
@ -22,7 +22,7 @@ import java.nio.ByteOrder;
|
||||
/**
|
||||
* Tests big-endian direct channel buffers
|
||||
*/
|
||||
public class BigEndianDirectChannelBufferTest extends AbstractChannelBufferTest {
|
||||
public class BigEndianDirectByteBufTest extends AbstractByteBufTest {
|
||||
|
||||
private ByteBuf buffer;
|
||||
|
@ -22,7 +22,7 @@ import static org.junit.Assert.*;
|
||||
/**
|
||||
* Tests big-endian heap channel buffers
|
||||
*/
|
||||
public class BigEndianHeapChannelBufferTest extends AbstractChannelBufferTest {
|
||||
public class BigEndianHeapByteBufTest extends AbstractByteBufTest {
|
||||
|
||||
private ByteBuf buffer;
|
||||
|
@ -24,7 +24,7 @@ import org.junit.Test;
|
||||
/**
|
||||
* Tests the index-finding capabilities of channel buffers
|
||||
*/
|
||||
public class ChannelBufferIndexFinderTest {
|
||||
public class ByteBufIndexFinderTest {
|
||||
|
||||
@Test
|
||||
public void testForward() {
|
@ -26,7 +26,7 @@ import org.junit.Test;
|
||||
/**
|
||||
* Tests channel buffer streams
|
||||
*/
|
||||
public class ChannelBufferStreamTest {
|
||||
public class ByteBufStreamTest {
|
||||
|
||||
@Test
|
||||
public void testAll() throws Exception {
|
@ -22,7 +22,7 @@ import static org.junit.Assert.*;
|
||||
/**
|
||||
* Tests duplicated channel buffers
|
||||
*/
|
||||
public class DuplicateChannelBufferTest extends AbstractChannelBufferTest {
|
||||
public class DuplicateByteBufTest extends AbstractByteBufTest {
|
||||
|
||||
private ByteBuf buffer;
|
||||
|
@ -19,8 +19,8 @@ package io.netty.buffer;
|
||||
/**
|
||||
* Tests little-endian composite channel buffers
|
||||
*/
|
||||
public class LittleEndianCompositeChannelBufferTest extends AbstractCompositeChannelBufferTest {
|
||||
public LittleEndianCompositeChannelBufferTest() {
|
||||
public class LittleEndianCompositeByteBufTest extends AbstractCompositeByteBufTest {
|
||||
public LittleEndianCompositeByteBufTest() {
|
||||
super(Unpooled.LITTLE_ENDIAN);
|
||||
}
|
||||
}
|
@ -22,7 +22,7 @@ import java.nio.ByteOrder;
|
||||
/**
|
||||
* Tests little-endian direct channel buffers
|
||||
*/
|
||||
public class LittleEndianDirectChannelBufferTest extends AbstractChannelBufferTest {
|
||||
public class LittleEndianDirectByteBufTest extends AbstractByteBufTest {
|
||||
|
||||
private ByteBuf buffer;
|
||||
|
@ -22,7 +22,7 @@ import java.nio.ByteOrder;
|
||||
/**
|
||||
* Tests little-endian heap channel buffers
|
||||
*/
|
||||
public class LittleEndianHeapChannelBufferTest extends AbstractChannelBufferTest {
|
||||
public class LittleEndianHeapByteBufTest extends AbstractByteBufTest {
|
||||
|
||||
private ByteBuf buffer;
|
||||
|
@ -31,7 +31,7 @@ import static org.junit.Assert.*;
|
||||
/**
|
||||
* Tests read-only channel buffers
|
||||
*/
|
||||
public class ReadOnlyChannelBufferTest {
|
||||
public class ReadOnlyByteBufTest {
|
||||
|
||||
@Test(expected = NullPointerException.class)
|
||||
public void shouldNotAllowNullInConstructor() {
|
@ -24,7 +24,7 @@ import org.junit.Test;
|
||||
/**
|
||||
* Tests sliced channel buffers
|
||||
*/
|
||||
public class SlicedChannelBufferTest extends AbstractChannelBufferTest {
|
||||
public class SlicedByteBufTest extends AbstractByteBufTest {
|
||||
|
||||
private final Random random = new Random();
|
||||
private ByteBuf buffer;
|
@ -34,7 +34,7 @@ import static org.junit.Assert.*;
|
||||
* Tests channel buffers
|
||||
*/
|
||||
@SuppressWarnings("ZeroLengthArrayAllocation")
|
||||
public class ChannelBuffersTest {
|
||||
public class UnpooledTest {
|
||||
|
||||
@Test
|
||||
public void testCompositeWrappedBuffer() {
|
Loading…
Reference in New Issue
Block a user