Home / Function/ testEncoder() — netty Function Reference

testEncoder() — netty Function Reference

Architecture documentation for the testEncoder() function in CodecStompTest.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  c3b58e6e_d65a_3010_4f69_c7c7061e04fa["testEncoder()"]
  fc8db9e0_562a_8e10_1866_371189eddf65["CodecStompTest"]
  c3b58e6e_d65a_3010_4f69_c7c7061e04fa -->|defined in| fc8db9e0_562a_8e10_1866_371189eddf65
  style c3b58e6e_d65a_3010_4f69_c7c7061e04fa fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

testsuite-jpms/src/test/java/io/netty/testsuite_jpms/test/CodecStompTest.java lines 35–50

    @Test
    public void testEncoder() {
        EmbeddedChannel channel = new EmbeddedChannel(new StompSubframeEncoder());
        StompHeadersSubframe frame = new DefaultStompHeadersSubframe(StompCommand.CONNECT);
        StompHeaders headers = frame.headers();
        headers.set(StompHeaders.HOST, "stomp.github.org");
        headers.set(StompHeaders.ACCEPT_VERSION, "1.1,1.2");
        channel.writeOutbound(frame);
        ByteBuf byteBuf = channel.readOutbound();
        assertEquals("CONNECT\n" +
                "host:stomp.github.org\n" +
                "accept-version:1.1,1.2\n" +
                "\n", byteBuf.toString(StandardCharsets.UTF_8));
        assertNotNull(byteBuf);
        byteBuf.release();
    }

Domain

Subdomains

Frequently Asked Questions

What does testEncoder() do?
testEncoder() is a function in the netty codebase, defined in testsuite-jpms/src/test/java/io/netty/testsuite_jpms/test/CodecStompTest.java.
Where is testEncoder() defined?
testEncoder() is defined in testsuite-jpms/src/test/java/io/netty/testsuite_jpms/test/CodecStompTest.java at line 35.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free