Search in sources :

Example 91 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 92 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 93 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 94 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 95 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)101 Record (org.xbill.DNS.Record)36 Message (org.xbill.DNS.Message)18 SRVRecord (org.xbill.DNS.SRVRecord)18 IOException (java.io.IOException)11 UnknownHostException (java.net.UnknownHostException)11 ArrayList (java.util.ArrayList)11 Lookup (org.xbill.DNS.Lookup)10 ARecord (org.xbill.DNS.ARecord)9 ExtendedResolver (org.xbill.DNS.ExtendedResolver)9 SimpleResolver (org.xbill.DNS.SimpleResolver)9 RRset (org.xbill.DNS.RRset)8 NSRecord (org.xbill.DNS.NSRecord)7 TXTRecord (org.xbill.DNS.TXTRecord)7 HashSet (java.util.HashSet)6 Iterator (java.util.Iterator)6 CNAMERecord (org.xbill.DNS.CNAMERecord)6 TextParseException (org.xbill.DNS.TextParseException)6 Update (org.xbill.DNS.Update)6 ZoneTransferIn (org.xbill.DNS.ZoneTransferIn)6