DnsServerAddressesTest.java — netty Source File
Architecture documentation for DnsServerAddressesTest.java, a java file in the netty codebase.
Entity Profile
Relationship Graph
Source Code
/*
* Copyright 2014 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 io.netty.util.NetUtil;
import org.junit.jupiter.api.Test;
import java.net.InetSocketAddress;
import java.util.Collections;
import java.util.IdentityHashMap;
import java.util.Set;
import static io.netty.resolver.dns.DefaultDnsServerAddressStreamProvider.defaultAddressList;
import static org.assertj.core.api.Assertions.assertThat;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotSame;
import static org.junit.jupiter.api.Assertions.assertSame;
public class DnsServerAddressesTest {
private static final InetSocketAddress ADDR1 = new InetSocketAddress(NetUtil.LOCALHOST, 1);
private static final InetSocketAddress ADDR2 = new InetSocketAddress(NetUtil.LOCALHOST, 2);
private static final InetSocketAddress ADDR3 = new InetSocketAddress(NetUtil.LOCALHOST, 3);
@Test
public void testDefaultAddresses() {
assertThat(defaultAddressList().size()).isGreaterThan(0);
}
@Test
public void testSequential() {
DnsServerAddresses seq = DnsServerAddresses.sequential(ADDR1, ADDR2, ADDR3);
assertNotSame(seq.stream(), seq.stream());
for (int j = 0; j < 2; j ++) {
DnsServerAddressStream i = seq.stream();
assertNext(i, ADDR1);
assertNext(i, ADDR2);
assertNext(i, ADDR3);
assertNext(i, ADDR1);
assertNext(i, ADDR2);
assertNext(i, ADDR3);
}
}
@Test
// ... (70 more lines)
Domain
Subdomains
Classes
Source
Frequently Asked Questions
What does DnsServerAddressesTest.java do?
DnsServerAddressesTest.java is a source file in the netty codebase, written in java. It belongs to the Buffer domain, Search subdomain.
Where is DnsServerAddressesTest.java in the architecture?
DnsServerAddressesTest.java is located at resolver-dns/src/test/java/io/netty/resolver/dns/DnsServerAddressesTest.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