CodecMarshallingTest Class — netty Architecture
Architecture documentation for the CodecMarshallingTest class in CodecMarshallingTest.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 14b8aafa_76bf_884b_ffb0_43fffd1a0f7b["CodecMarshallingTest"] f9a450e6_a60f_7519_5c9e_b37e2aa0f115["CodecMarshallingTest.java"] 14b8aafa_76bf_884b_ffb0_43fffd1a0f7b -->|defined in| f9a450e6_a60f_7519_5c9e_b37e2aa0f115 b7dce377_8124_d9a5_35a2_b24ca8dd513b["smokeTest()"] 14b8aafa_76bf_884b_ffb0_43fffd1a0f7b -->|method| b7dce377_8124_d9a5_35a2_b24ca8dd513b
Relationship Graph
Source Code
testsuite-jpms/src/test/java/io/netty/testsuite_jpms/test/CodecMarshallingTest.java lines 33–57
public class CodecMarshallingTest {
@Test
public void smokeTest() throws Exception {
@SuppressWarnings("RedundantStringConstructorCall")
String testObject = new String("test");
MarshallingConfiguration configuration = new MarshallingConfiguration();
configuration.setVersion(5);
MarshallerFactory marshallerFactory = Marshalling.getProvidedMarshallerFactory("serial");
DefaultMarshallerProvider provider = new DefaultMarshallerProvider(marshallerFactory, configuration);
EmbeddedChannel ch = new EmbeddedChannel(new CompatibleMarshallingEncoder(provider));
ch.writeOutbound(testObject);
assertTrue(ch.finish());
ByteBuf buffer = ch.readOutbound();
Unmarshaller unmarshaller = marshallerFactory.createUnmarshaller(configuration);
unmarshaller.start(Marshalling.createByteInput(buffer.nioBuffer()));
String read = (String) unmarshaller.readObject();
assertEquals(testObject, read);
assertEquals(-1, unmarshaller.read());
assertNull(ch.readOutbound());
unmarshaller.finish();
unmarshaller.close();
buffer.release();
}
}
Source
Frequently Asked Questions
What is the CodecMarshallingTest class?
CodecMarshallingTest is a class in the netty codebase, defined in testsuite-jpms/src/test/java/io/netty/testsuite_jpms/test/CodecMarshallingTest.java.
Where is CodecMarshallingTest defined?
CodecMarshallingTest is defined in testsuite-jpms/src/test/java/io/netty/testsuite_jpms/test/CodecMarshallingTest.java at line 33.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free