Home / Class/ ReadOnlyHttp2HeadersTest Class — netty Architecture

ReadOnlyHttp2HeadersTest Class — netty Architecture

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

Entity Profile

Dependency Diagram

graph TD
  e54a46f5_3e42_e96a_8c89_2c5628e4cbd9["ReadOnlyHttp2HeadersTest"]
  e405ac89_6bab_f22a_c9e6_bb9516f0e787["ReadOnlyHttp2HeadersTest.java"]
  e54a46f5_3e42_e96a_8c89_2c5628e4cbd9 -->|defined in| e405ac89_6bab_f22a_c9e6_bb9516f0e787
  339a9db8_51fb_31a9_f23e_25eb6b0b0aa2["notKeyValuePairThrows()"]
  e54a46f5_3e42_e96a_8c89_2c5628e4cbd9 -->|method| 339a9db8_51fb_31a9_f23e_25eb6b0b0aa2
  0b7ac62c_5c05_3a65_0f4f_c424460ff55b["nullTrailersNotAllowed()"]
  e54a46f5_3e42_e96a_8c89_2c5628e4cbd9 -->|method| 0b7ac62c_5c05_3a65_0f4f_c424460ff55b
  5a6b9001_5b9c_eb1f_b3ee_73f7291be57f["nullHeaderNameNotChecked()"]
  e54a46f5_3e42_e96a_8c89_2c5628e4cbd9 -->|method| 5a6b9001_5b9c_eb1f_b3ee_73f7291be57f
  aeeae797_fd7a_bb4e_e4f8_04f9c9bff6f3["nullHeaderNameValidated()"]
  e54a46f5_3e42_e96a_8c89_2c5628e4cbd9 -->|method| aeeae797_fd7a_bb4e_e4f8_04f9c9bff6f3
  d200b1d9_b2d2_fc0a_50df_ae3666e1f578["pseudoHeaderNotAllowedAfterNonPseudoHeaders()"]
  e54a46f5_3e42_e96a_8c89_2c5628e4cbd9 -->|method| d200b1d9_b2d2_fc0a_50df_ae3666e1f578
  d88db344_9848_243b_b3cd_c2e2157a6ccd["nullValuesAreNotAllowed()"]
  e54a46f5_3e42_e96a_8c89_2c5628e4cbd9 -->|method| d88db344_9848_243b_b3cd_c2e2157a6ccd
  9226d258_44d6_c2a3_d7cd_c5e176185b8d["emptyHeaderNameAllowed()"]
  e54a46f5_3e42_e96a_8c89_2c5628e4cbd9 -->|method| 9226d258_44d6_c2a3_d7cd_c5e176185b8d
  de45654e_80f0_c98a_8a1a_c595b4afe7aa["testPseudoHeadersMustComeFirstWhenIteratingServer()"]
  e54a46f5_3e42_e96a_8c89_2c5628e4cbd9 -->|method| de45654e_80f0_c98a_8a1a_c595b4afe7aa
  4ed9f295_e4cd_42eb_4e02_5117929e5d6f["testPseudoHeadersMustComeFirstWhenIteratingClient()"]
  e54a46f5_3e42_e96a_8c89_2c5628e4cbd9 -->|method| 4ed9f295_e4cd_42eb_4e02_5117929e5d6f
  43467906_ae8e_e02b_242e_c203a9d08e06["testIteratorReadOnlyClient()"]
  e54a46f5_3e42_e96a_8c89_2c5628e4cbd9 -->|method| 43467906_ae8e_e02b_242e_c203a9d08e06
  64060b5e_2233_4593_c824_1dec62a3d483["testIteratorReadOnlyServer()"]
  e54a46f5_3e42_e96a_8c89_2c5628e4cbd9 -->|method| 64060b5e_2233_4593_c824_1dec62a3d483
  80af5224_99c9_30cf_b8d0_e9501111f01d["testIteratorReadOnlyTrailers()"]
  e54a46f5_3e42_e96a_8c89_2c5628e4cbd9 -->|method| 80af5224_99c9_30cf_b8d0_e9501111f01d
  b5e7854d_f437_f9e1_a42b_fe973ccc6d54["testIteratorEntryReadOnlyClient()"]
  e54a46f5_3e42_e96a_8c89_2c5628e4cbd9 -->|method| b5e7854d_f437_f9e1_a42b_fe973ccc6d54

Relationship Graph

Source Code

codec-http2/src/test/java/io/netty/handler/codec/http2/ReadOnlyHttp2HeadersTest.java lines 33–298

public class ReadOnlyHttp2HeadersTest {
    @Test
    public void notKeyValuePairThrows() {
        assertThrows(IllegalArgumentException.class, new Executable() {
            @Override
            public void execute() {
                ReadOnlyHttp2Headers.trailers(false, new AsciiString[]{ null });
            }
        });
    }

    @Test
    public void nullTrailersNotAllowed() {
        assertThrows(NullPointerException.class, new Executable() {
            @Override
            public void execute() {
                ReadOnlyHttp2Headers.trailers(false, (AsciiString[]) null);
            }
        });
    }

    @Test
    public void nullHeaderNameNotChecked() {
        ReadOnlyHttp2Headers.trailers(false, null, null);
    }

    @Test
    public void nullHeaderNameValidated() {
        assertThrows(Http2Exception.class, new Executable() {
            @Override
            public void execute() {
                ReadOnlyHttp2Headers.trailers(true, null, new AsciiString("foo"));
            }
        });
    }

    @Test
    public void pseudoHeaderNotAllowedAfterNonPseudoHeaders() {
        assertThrows(IllegalArgumentException.class, new Executable() {
            @Override
            public void execute() {
                ReadOnlyHttp2Headers.trailers(true, new AsciiString(":scheme"), new AsciiString("foo"),
                        new AsciiString("othername"), new AsciiString("goo"),
                        new AsciiString(":path"), new AsciiString("val"));
            }
        });
    }

    @Test
    public void nullValuesAreNotAllowed() {
        assertThrows(IllegalArgumentException.class, new Executable() {
            @Override
            public void execute() {
                ReadOnlyHttp2Headers.trailers(true, new AsciiString("foo"), null);
            }
        });
    }

    @Test
    public void emptyHeaderNameAllowed() {
        ReadOnlyHttp2Headers.trailers(false, AsciiString.EMPTY_STRING, new AsciiString("foo"));
    }

    @Test
    public void testPseudoHeadersMustComeFirstWhenIteratingServer() {
        Http2Headers headers = newServerHeaders();
        verifyPseudoHeadersFirst(headers);
    }

    @Test
    public void testPseudoHeadersMustComeFirstWhenIteratingClient() {
        Http2Headers headers = newClientHeaders();
        verifyPseudoHeadersFirst(headers);
    }

    @Test
    public void testIteratorReadOnlyClient() {
        assertThrows(UnsupportedOperationException.class, new Executable() {
            @Override
            public void execute() {
                testIteratorReadOnly(newClientHeaders());

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free