Home / Function/ testMarshalling() — netty Function Reference

testMarshalling() — netty Function Reference

Architecture documentation for the testMarshalling() function in AbstractCompatibleMarshallingEncoderTest.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  d08b0f04_f3c6_d80d_0ca4_8a2a59388ce1["testMarshalling()"]
  80b1b53d_459c_7b14_8fbb_123d40300ab8["AbstractCompatibleMarshallingEncoderTest"]
  d08b0f04_f3c6_d80d_0ca4_8a2a59388ce1 -->|defined in| 80b1b53d_459c_7b14_8fbb_123d40300ab8
  style d08b0f04_f3c6_d80d_0ca4_8a2a59388ce1 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

codec-marshalling/src/test/java/io/netty/handler/codec/marshalling/AbstractCompatibleMarshallingEncoderTest.java lines 33–60

    @Test
    public void testMarshalling() throws Exception {
        @SuppressWarnings("RedundantStringConstructorCall")
        String testObject = new String("test");

        final MarshallerFactory marshallerFactory = createMarshallerFactory();
        final MarshallingConfiguration configuration = createMarshallingConfig();

        EmbeddedChannel ch = new EmbeddedChannel(createEncoder());

        ch.writeOutbound(testObject);
        assertTrue(ch.finish());

        ByteBuf buffer = ch.readOutbound();

        Unmarshaller unmarshaller = marshallerFactory.createUnmarshaller(configuration);
        unmarshaller.start(Marshalling.createByteInput(truncate(buffer).nioBuffer()));
        String read = (String) unmarshaller.readObject();
        assertEquals(testObject, read);

        assertEquals(-1, unmarshaller.read());

        assertNull(ch.readOutbound());

        unmarshaller.finish();
        unmarshaller.close();
        buffer.release();
    }

Domain

Subdomains

Frequently Asked Questions

What does testMarshalling() do?
testMarshalling() is a function in the netty codebase, defined in codec-marshalling/src/test/java/io/netty/handler/codec/marshalling/AbstractCompatibleMarshallingEncoderTest.java.
Where is testMarshalling() defined?
testMarshalling() is defined in codec-marshalling/src/test/java/io/netty/handler/codec/marshalling/AbstractCompatibleMarshallingEncoderTest.java at line 33.

Analyze Your Own Codebase

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

Try Supermodel Free