use of org.junit.jupiter.api.function.Executable in project netty by netty.
the class HpackDynamicTableTest method testGetEntryExceptionally.
@Test
public void testGetEntryExceptionally() {
final HpackDynamicTable table = new HpackDynamicTable(1);
assertThrows(IndexOutOfBoundsException.class, new Executable() {
@Override
public void execute() throws Throwable {
table.getEntry(1);
}
});
}
use of org.junit.jupiter.api.function.Executable in project netty by netty.
the class HpackHuffmanTest method testDecodeExtraPadding.
@Test
public void testDecodeExtraPadding() throws Http2Exception {
// '1', 'EOS'
final byte[] buf = makeBuf(0x0f, 0xFF);
assertThrows(Http2Exception.class, new Executable() {
@Override
public void execute() throws Throwable {
decode(buf);
}
});
}
use of org.junit.jupiter.api.function.Executable in project netty by netty.
the class HpackHuffmanTest method testDecodeExtraPadding4byte.
@Test
public void testDecodeExtraPadding4byte() throws Http2Exception {
// 'a'
final byte[] buf = makeBuf(0x1F, 0xFF, 0xFF, 0xFF);
assertThrows(Http2Exception.class, new Executable() {
@Override
public void execute() throws Throwable {
decode(buf);
}
});
}
use of org.junit.jupiter.api.function.Executable in project netty by netty.
the class HpackHuffmanTest method testDecodePartialSymbol.
@Test
public void testDecodePartialSymbol() throws Http2Exception {
final byte[] buf = // " pFA\x00", 31 bits of padding, a.k.a. EOS
makeBuf(0x52, 0xBC, 0x30, 0xFF, 0xFF, 0xFF, 0xFF);
assertThrows(Http2Exception.class, new Executable() {
@Override
public void execute() throws Throwable {
decode(buf);
}
});
}
use of org.junit.jupiter.api.function.Executable in project netty by netty.
the class HpackHuffmanTest method testDecodeExtraPadding29bit.
@Test
public void testDecodeExtraPadding29bit() throws Http2Exception {
// '|'
final byte[] buf = makeBuf(0xFF, 0x9F, 0xFF, 0xFF, 0xFF);
assertThrows(Http2Exception.class, new Executable() {
@Override
public void execute() throws Throwable {
decode(buf);
}
});
}
Aggregations