Home / Function/ testTwoParameters() — netty Function Reference

testTwoParameters() — netty Function Reference

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

Entity Profile

Dependency Diagram

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

Relationship Graph

Source Code

common/src/test/java/io/netty/util/internal/logging/MessageFormatterTest.java lines 118–146

    @Test
    public void testTwoParameters() {
        String result = MessageFormatter.format("Value {} is smaller than {}.", 1, 2).getMessage();
        assertEquals("Value 1 is smaller than 2.", result);

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

        result = MessageFormatter.format("{}{}", 1, 2).getMessage();
        assertEquals("12", result);

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

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

        result = MessageFormatter.format("Value {} is smaller than \\{} tail", 1, 2).getMessage();
        assertEquals("Value 1 is smaller than {} tail", result);

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

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

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

Domain

Subdomains

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free