Home / Function/ testDetermineEncoding() — netty Function Reference

testDetermineEncoding() — netty Function Reference

Architecture documentation for the testDetermineEncoding() function in HttpContentCompressorTest.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  ac9bf157_55d6_85f8_4751_4086eaf29b39["testDetermineEncoding()"]
  32ab04b0_6c83_d4f7_6483_fd304f908331["HttpContentCompressorTest"]
  ac9bf157_55d6_85f8_4751_4086eaf29b39 -->|defined in| 32ab04b0_6c83_d4f7_6483_fd304f908331
  style ac9bf157_55d6_85f8_4751_4086eaf29b39 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

codec-http/src/test/java/io/netty/handler/codec/http/HttpContentCompressorTest.java lines 107–133

    @Test
    public void testDetermineEncoding() throws Exception {
        HttpContentCompressor compressor = new HttpContentCompressor((CompressionOptions[]) null);

        String[] tests = {
                // Accept-Encoding -> Content-Encoding
                "", null,
                ",", null,
                "identity", null,
                "unknown", null,
                "*", "br",
                "br", "br",
                "br ; q=0.1", "br",
                "unknown, br", "br",
                "br, gzip", "br",
                "gzip, br", "br",
                "identity, br", "br",
                "gzip", "gzip",
                "gzip ; q=0.1", "gzip",
        };
        for (int i = 0; i < tests.length; i += 2) {
            final String acceptEncoding = tests[i];
            final String expectedEncoding = tests[i + 1];
            final String targetEncoding = compressor.determineEncoding(acceptEncoding);
            assertEquals(expectedEncoding, targetEncoding);
        }
    }

Domain

Subdomains

Frequently Asked Questions

What does testDetermineEncoding() do?
testDetermineEncoding() is a function in the netty codebase, defined in codec-http/src/test/java/io/netty/handler/codec/http/HttpContentCompressorTest.java.
Where is testDetermineEncoding() defined?
testDetermineEncoding() is defined in codec-http/src/test/java/io/netty/handler/codec/http/HttpContentCompressorTest.java at line 107.

Analyze Your Own Codebase

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

Try Supermodel Free