]> WPIA git - gigi.git/blob - tests/club/wpia/gigi/TestJavaDNSSanity.java
add: ensure that for Org Administrator actions certificate login is used
[gigi.git] / tests / club / wpia / gigi / TestJavaDNSSanity.java
1 package club.wpia.gigi;
2
3 import static org.junit.Assert.*;
4
5 import org.junit.Test;
6 import org.xbill.DNS.Name;
7 import org.xbill.DNS.NameTooLongException;
8 import org.xbill.DNS.TextParseException;
9
10 public class TestJavaDNSSanity {
11
12     /**
13      * Simple testcase from the dnsjava examples.
14      */
15     @Test
16     public void testJavaDNSSanity() throws TextParseException, NameTooLongException {
17         Name n = Name.fromString("www.dnsjava.org");
18         Name o = Name.fromString("dnsjava.org");
19
20         assertTrue(n.subdomain(o));
21         Name rel = n.relativize(o);
22         Name n2 = Name.concatenate(rel, o);
23         assertEquals(n2, n);
24     }
25
26 }