Home / File/ NameServerComparatorTest.java — netty Source File

NameServerComparatorTest.java — netty Source File

Architecture documentation for NameServerComparatorTest.java, a java file in the netty codebase.

File java Buffer Search 1 classes

Entity Profile

Relationship Graph

Source Code

/*
 * Copyright 2018 The Netty Project
 *
 * The Netty Project licenses this file to you under the Apache License,
 * version 2.0 (the "License"); you may not use this file except in compliance
 * with the License. You may obtain a copy of the License at:
 *
 *   https://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 * License for the specific language governing permissions and limitations
 * under the License.
 */
package io.netty.resolver.dns;

import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;

import java.net.Inet4Address;
import java.net.Inet6Address;
import java.net.InetAddress;
import java.net.InetSocketAddress;
import java.net.UnknownHostException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;

import static org.junit.jupiter.api.Assertions.assertEquals;

public class NameServerComparatorTest {

    private static InetSocketAddress IPV4ADDRESS1;
    private static InetSocketAddress IPV4ADDRESS2;
    private static InetSocketAddress IPV4ADDRESS3;

    private static InetSocketAddress IPV6ADDRESS1;
    private static InetSocketAddress IPV6ADDRESS2;

    private static InetSocketAddress UNRESOLVED1;
    private static InetSocketAddress UNRESOLVED2;
    private static InetSocketAddress UNRESOLVED3;

    @BeforeAll
    public static void before() throws UnknownHostException {
        IPV4ADDRESS1 = new InetSocketAddress(InetAddress.getByAddress("ns1", new byte[] { 10, 0, 0, 1 }), 53);
        IPV4ADDRESS2 = new InetSocketAddress(InetAddress.getByAddress("ns2", new byte[] { 10, 0, 0, 2 }), 53);
        IPV4ADDRESS3 = new InetSocketAddress(InetAddress.getByAddress("ns3", new byte[] { 10, 0, 0, 3 }), 53);

        IPV6ADDRESS1 = new InetSocketAddress(InetAddress.getByAddress(
                "ns1", new byte[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 }), 53);
        IPV6ADDRESS2 = new InetSocketAddress(InetAddress.getByAddress(
                "ns2", new byte[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2 }), 53);

        UNRESOLVED1 = InetSocketAddress.createUnresolved("ns3", 53);
        UNRESOLVED2 = InetSocketAddress.createUnresolved("ns4", 53);
        UNRESOLVED3 = InetSocketAddress.createUnresolved("ns5", 53);
    }
// ... (112 more lines)

Domain

Subdomains

Frequently Asked Questions

What does NameServerComparatorTest.java do?
NameServerComparatorTest.java is a source file in the netty codebase, written in java. It belongs to the Buffer domain, Search subdomain.
Where is NameServerComparatorTest.java in the architecture?
NameServerComparatorTest.java is located at resolver-dns/src/test/java/io/netty/resolver/dns/NameServerComparatorTest.java (domain: Buffer, subdomain: Search, directory: resolver-dns/src/test/java/io/netty/resolver/dns).

Analyze Your Own Codebase

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

Try Supermodel Free