|
|
@ -33,7 +33,7 @@ object Js5ResponseEncoderTest { |
|
|
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
@Test |
|
|
|
fun testEncodeEmpty() { |
|
|
|
fun testEncodeEmpty() { |
|
|
|
val channel = EmbeddedChannel(Js5ResponseEncoder()) |
|
|
|
val channel = EmbeddedChannel(Js5ResponseEncoder) |
|
|
|
|
|
|
|
|
|
|
|
assertThrows<EncoderException> { |
|
|
|
assertThrows<EncoderException> { |
|
|
|
channel.writeOutbound(Js5Response(true, 2, 3, Unpooled.EMPTY_BUFFER)) |
|
|
|
channel.writeOutbound(Js5Response(true, 2, 3, Unpooled.EMPTY_BUFFER)) |
|
|
@ -41,7 +41,7 @@ object Js5ResponseEncoderTest { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private fun testEncode(container: String, encoded: String, prefetch: Boolean) { |
|
|
|
private fun testEncode(container: String, encoded: String, prefetch: Boolean) { |
|
|
|
val channel = EmbeddedChannel(Js5ResponseEncoder()) |
|
|
|
val channel = EmbeddedChannel(Js5ResponseEncoder) |
|
|
|
|
|
|
|
|
|
|
|
read(container).use { buf -> |
|
|
|
read(container).use { buf -> |
|
|
|
channel.writeOutbound(Js5Response(prefetch, 2, 3, buf.retain())) |
|
|
|
channel.writeOutbound(Js5Response(prefetch, 2, 3, buf.retain())) |
|
|
|