Home / Function/ testArrayFormat() — netty Function Reference

testArrayFormat() — netty Function Reference

Architecture documentation for the testArrayFormat() function in MessageFormatterTest.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  bbf91147_7029_aee9_5e0c_d303c09191df["testArrayFormat()"]
  61b49498_5128_d2ab_e17e_0c346b46695a["MessageFormatterTest"]
  bbf91147_7029_aee9_5e0c_d303c09191df -->|defined in| 61b49498_5128_d2ab_e17e_0c346b46695a
  style bbf91147_7029_aee9_5e0c_d303c09191df fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

common/src/test/java/io/netty/util/internal/logging/MessageFormatterTest.java lines 183–207

    @Test
    public void testArrayFormat() {
        Integer[] ia0 = { 1, 2, 3 };

        String result = MessageFormatter.arrayFormat("Value {} is smaller than {} and {}.", ia0).getMessage();
        assertEquals("Value 1 is smaller than 2 and 3.", result);

        result = MessageFormatter.arrayFormat("{}{}{}", ia0).getMessage();
        assertEquals("123", result);

        result = MessageFormatter.arrayFormat("Value {} is smaller than {}.", ia0).getMessage();
        assertEquals("Value 1 is smaller than 2.", result);

        result = MessageFormatter.arrayFormat("Value {} is smaller than {}", ia0).getMessage();
        assertEquals("Value 1 is smaller than 2", result);

        result = MessageFormatter.arrayFormat("Val={}, {, Val={}", ia0).getMessage();
        assertEquals("Val=1, {, Val=2", result);

        result = MessageFormatter.arrayFormat("Val={}, {, Val={}", ia0).getMessage();
        assertEquals("Val=1, {, Val=2", result);

        result = MessageFormatter.arrayFormat("Val1={}, Val2={", ia0).getMessage();
        assertEquals("Val1=1, Val2={", result);
    }

Domain

Subdomains

Frequently Asked Questions

What does testArrayFormat() do?
testArrayFormat() is a function in the netty codebase, defined in common/src/test/java/io/netty/util/internal/logging/MessageFormatterTest.java.
Where is testArrayFormat() defined?
testArrayFormat() is defined in common/src/test/java/io/netty/util/internal/logging/MessageFormatterTest.java at line 183.

Analyze Your Own Codebase

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

Try Supermodel Free