0%

Netty in Action Chapter 9

Chapter 9 - Unit test

In this chapter, it introduces the use of EmbeddedChannel, we can write data into the channel (no matter it's inbound or outbound data), and check the output at the end of the pipeline. It's convenient especially for unit tests.
EmbeddedChannel data flow
In doc of EmbeddedChannel, you may find that only this channel has an initialization method where you can put a list of handlers, which is easy for writing tests.
In here, unit tests for inbound traffic, outbound traffic and exception handling are listed.