fix testFromEmptyByteBufferWithoutReleaser
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
This commit is contained in:
parent
2d9c735d63
commit
b244c9f320
|
@ -23,15 +23,14 @@ import org.junit.jupiter.api.Test;
|
||||||
import static org.hamcrest.MatcherAssert.assertThat;
|
import static org.hamcrest.MatcherAssert.assertThat;
|
||||||
import static org.hamcrest.Matchers.is;
|
import static org.hamcrest.Matchers.is;
|
||||||
import static org.hamcrest.Matchers.sameInstance;
|
import static org.hamcrest.Matchers.sameInstance;
|
||||||
import static org.junit.jupiter.api.Assertions.assertThrows;
|
|
||||||
|
|
||||||
public class ContentTest
|
public class ContentTest
|
||||||
{
|
{
|
||||||
@Test
|
@Test
|
||||||
public void testFromEmptyByteBufferWithoutReleaser()
|
public void testFromEmptyByteBufferWithoutReleaser()
|
||||||
{
|
{
|
||||||
assertThrows(IllegalArgumentException.class, () -> Content.Chunk.from(ByteBuffer.wrap(new byte[0]), true));
|
assertThat(Content.Chunk.from(ByteBuffer.wrap(new byte[0]), true), sameInstance(Content.Chunk.EOF));
|
||||||
assertThrows(IllegalArgumentException.class, () -> Content.Chunk.from(ByteBuffer.wrap(new byte[0]), false));
|
assertThat(Content.Chunk.from(ByteBuffer.wrap(new byte[0]), false), sameInstance(Content.Chunk.EMPTY));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
Loading…
Reference in New Issue