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());
}
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());
}
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));
}
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) {
}
}
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);
}
Aggregations