Search in sources :

Example 96 with Name

use of org.xbill.DNS.Name in project dim by 1and1.

the class NameTest method test_toString_abs.

public void test_toString_abs() throws TextParseException {
    String in = "This.Is.My.Absolute.Name.";
    Name n = new Name(in);
    assertEquals(in, n.toString());
}
Also used : Name(org.xbill.DNS.Name)

Example 97 with Name

use of org.xbill.DNS.Name in project dim by 1and1.

the class NameTest method test_toString_rel.

public void test_toString_rel() throws TextParseException {
    String in = "This.Is.My.Relative.Name";
    Name n = new Name(in);
    assertEquals(in, n.toString());
}
Also used : Name(org.xbill.DNS.Name)

Example 98 with Name

use of org.xbill.DNS.Name in project dim by 1and1.

the class NameTest method test_subdomain_rel.

public void test_subdomain_rel() throws TextParseException {
    Name dom = new Name("the.domain");
    Name sub = new Name("sub.of.the.domain");
    assertTrue(sub.subdomain(dom));
    assertFalse(dom.subdomain(sub));
}
Also used : Name(org.xbill.DNS.Name)

Example 99 with Name

use of org.xbill.DNS.Name in project dim by 1and1.

the class NameTest method test_wild_toosmall.

public void test_wild_toosmall() throws TextParseException {
    Name sub = Name.fromString("a.b.c.");
    try {
        sub.wild(0);
        fail("IllegalArgumentException not thrown");
    } catch (IllegalArgumentException e) {
    }
}
Also used : Name(org.xbill.DNS.Name)

Example 100 with Name

use of org.xbill.DNS.Name in project dim by 1and1.

the class NameTest method test_relativize_disjoint.

public void test_relativize_disjoint() throws TextParseException {
    Name sub = Name.fromString("a.b.c.");
    Name dom = Name.fromString("e.f.");
    Name n = sub.relativize(dom);
    assertEquals(sub, n);
}
Also used : Name(org.xbill.DNS.Name)

Aggregations

Name (org.xbill.DNS.Name)110 Record (org.xbill.DNS.Record)38 Message (org.xbill.DNS.Message)19 SRVRecord (org.xbill.DNS.SRVRecord)18 ArrayList (java.util.ArrayList)13 IOException (java.io.IOException)12 UnknownHostException (java.net.UnknownHostException)11 Lookup (org.xbill.DNS.Lookup)10 TextParseException (org.xbill.DNS.TextParseException)10 ARecord (org.xbill.DNS.ARecord)9 CNAMERecord (org.xbill.DNS.CNAMERecord)9 ExtendedResolver (org.xbill.DNS.ExtendedResolver)9 RRset (org.xbill.DNS.RRset)9 SimpleResolver (org.xbill.DNS.SimpleResolver)9 Zone (org.xbill.DNS.Zone)9 NSRecord (org.xbill.DNS.NSRecord)8 TSIG (org.xbill.DNS.TSIG)7 TXTRecord (org.xbill.DNS.TXTRecord)7 HashSet (java.util.HashSet)6 Iterator (java.util.Iterator)6