DnsRecordTypeTest Class — netty Architecture
Architecture documentation for the DnsRecordTypeTest class in DnsRecordTypeTest.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 0e08b3c9_f772_c257_7a60_770f6d346b67["DnsRecordTypeTest"] 8992c764_2a72_43fe_f3f0_a1257c406fdb["DnsRecordTypeTest.java"] 0e08b3c9_f772_c257_7a60_770f6d346b67 -->|defined in| 8992c764_2a72_43fe_f3f0_a1257c406fdb 410dbbe3_4155_7c5a_916b_557d8399267d["allTypes()"] 0e08b3c9_f772_c257_7a60_770f6d346b67 -->|method| 410dbbe3_4155_7c5a_916b_557d8399267d d15645c9_28de_7004_d736_16ea99f6493a["testSanity()"] 0e08b3c9_f772_c257_7a60_770f6d346b67 -->|method| d15645c9_28de_7004_d736_16ea99f6493a 9176929e_122f_5699_b523_0e04b698b5e1["testHashCode()"] 0e08b3c9_f772_c257_7a60_770f6d346b67 -->|method| 9176929e_122f_5699_b523_0e04b698b5e1 089d4fcf_643b_194f_e52d_aca249b83c83["testEquals()"] 0e08b3c9_f772_c257_7a60_770f6d346b67 -->|method| 089d4fcf_643b_194f_e52d_aca249b83c83 6e611563_dae8_7d58_cb55_1d46c0284430["testFind()"] 0e08b3c9_f772_c257_7a60_770f6d346b67 -->|method| 6e611563_dae8_7d58_cb55_1d46c0284430
Relationship Graph
Source Code
codec-dns/src/test/java/io/netty/handler/codec/dns/DnsRecordTypeTest.java lines 31–86
public class DnsRecordTypeTest {
private static List<DnsRecordType> allTypes() throws Exception {
List<DnsRecordType> result = new ArrayList<DnsRecordType>();
for (Field field : DnsRecordType.class.getFields()) {
if ((field.getModifiers() & Modifier.STATIC) != 0 && field.getType() == DnsRecordType.class) {
result.add((DnsRecordType) field.get(null));
}
}
assertFalse(result.isEmpty());
return result;
}
@Test
public void testSanity() throws Exception {
assertEquals(allTypes().size(), new HashSet<DnsRecordType>(allTypes()).size(),
"More than one type has the same int value");
}
/**
* Test of hashCode method, of class DnsRecordType.
*/
@Test
public void testHashCode() throws Exception {
for (DnsRecordType t : allTypes()) {
assertEquals(t.intValue(), t.hashCode());
}
}
/**
* Test of equals method, of class DnsRecordType.
*/
@Test
public void testEquals() throws Exception {
for (DnsRecordType t1 : allTypes()) {
for (DnsRecordType t2 : allTypes()) {
if (t1 != t2) {
assertNotEquals(t1, t2);
}
}
}
}
/**
* Test of find method, of class DnsRecordType.
*/
@Test
public void testFind() throws Exception {
for (DnsRecordType t : allTypes()) {
DnsRecordType found = DnsRecordType.valueOf(t.intValue());
assertSame(t, found);
found = DnsRecordType.valueOf(t.name());
assertSame(t, found, t.name());
}
}
}
Source
Frequently Asked Questions
What is the DnsRecordTypeTest class?
DnsRecordTypeTest is a class in the netty codebase, defined in codec-dns/src/test/java/io/netty/handler/codec/dns/DnsRecordTypeTest.java.
Where is DnsRecordTypeTest defined?
DnsRecordTypeTest is defined in codec-dns/src/test/java/io/netty/handler/codec/dns/DnsRecordTypeTest.java at line 31.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free