Home / Class/ Http2ExceptionTest Class — netty Architecture

Http2ExceptionTest Class — netty Architecture

Architecture documentation for the Http2ExceptionTest class in Http2ExceptionTest.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  cdf5f195_adc2_28f0_e543_3275776994bb["Http2ExceptionTest"]
  e756e0b5_5e3d_7efe_f94d_2e52c9816f84["Http2ExceptionTest.java"]
  cdf5f195_adc2_28f0_e543_3275776994bb -->|defined in| e756e0b5_5e3d_7efe_f94d_2e52c9816f84
  7db80c79_aca0_5a3a_5e8b_cfbdaead36a0["connectionErrorHandlesMessage()"]
  cdf5f195_adc2_28f0_e543_3275776994bb -->|method| 7db80c79_aca0_5a3a_5e8b_cfbdaead36a0
  b670196c_cd29_6b21_2c9a_7320e69141ad["connectionErrorHandlesNullExceptionMessage()"]
  cdf5f195_adc2_28f0_e543_3275776994bb -->|method| b670196c_cd29_6b21_2c9a_7320e69141ad
  e116e217_356a_2bcf_8db4_0e5ed2ec847e["connectionErrorHandlesMultipleMessages()"]
  cdf5f195_adc2_28f0_e543_3275776994bb -->|method| e116e217_356a_2bcf_8db4_0e5ed2ec847e

Relationship Graph

Source Code

codec-http2/src/test/java/io/netty/handler/codec/http2/Http2ExceptionTest.java lines 25–50

class Http2ExceptionTest {

    @Test
    public void connectionErrorHandlesMessage() {
        DecoderException e = new TooLongHttpLineException("An HTTP line is larger than 1024 bytes.");
        Http2Exception http2Exception = Http2Exception.connectionError(COMPRESSION_ERROR, e, e.getMessage());
        assertEquals(COMPRESSION_ERROR, http2Exception.error());
        assertEquals("An HTTP line is larger than 1024 bytes.", http2Exception.getMessage());
    }

    @Test
    public void connectionErrorHandlesNullExceptionMessage() {
        Exception e = new RuntimeException();
        Http2Exception http2Exception = Http2Exception.connectionError(COMPRESSION_ERROR, e, e.getMessage());
        assertEquals(COMPRESSION_ERROR, http2Exception.error());
        assertEquals("Unexpected error", http2Exception.getMessage());
    }

    @Test
    public void connectionErrorHandlesMultipleMessages() {
        Exception e = new RuntimeException();
        Http2Exception http2Exception = Http2Exception.connectionError(COMPRESSION_ERROR, e, e.getMessage(), "a", "b");
        assertEquals(COMPRESSION_ERROR, http2Exception.error());
        assertEquals("Unexpected error: [a, b]", http2Exception.getMessage());
    }
}

Frequently Asked Questions

What is the Http2ExceptionTest class?
Http2ExceptionTest is a class in the netty codebase, defined in codec-http2/src/test/java/io/netty/handler/codec/http2/Http2ExceptionTest.java.
Where is Http2ExceptionTest defined?
Http2ExceptionTest is defined in codec-http2/src/test/java/io/netty/handler/codec/http2/Http2ExceptionTest.java at line 25.

Analyze Your Own Codebase

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

Try Supermodel Free