1 package com.verisign.tat.dnssec;
3 import junit.framework.Test;
4 import junit.framework.TestCase;
5 import junit.framework.TestSuite;
8 public class CaptiveValidatorTest
11 public static class Test_init extends TestCase
13 protected void setUp() {
17 public void test_0arg()
19 CaptiveValidator v = new CaptiveValidator();
24 public static class Test_Validate extends TestCase
28 // Set up a base Response message
29 protected void setUp() {
30 baseMessage = new Message();
32 // set up our response header; note that the captive
33 // validator code doesn't actually look at anything in the
34 // header but the RCODE, really, so the flag values
35 // probably don't matter. But make them realistic anyway.
36 Header hdr = new Header();
37 hdr.setOpcode(DNS.Opcode.QUERY);
38 hdr.setRcode(DNS.Rcode.NOERROR);
39 hdr.setFlag(DNS.Flags.QR);
40 hdr.setFlag(DNS.Flags.AA);
41 hdr.setFlag(DNS.Flags.RD);
42 baseMessage.setHeader(hdr);
47 public void test_positive()
49 Message m = new Message();
52 public void test_referral()
56 public void test_nodata()
60 public void test_nameerror()
64 public void test_cname()
68 public void test_any()
74 public static Test suite()
76 TestSuite s = new TestSuite();
77 s.addTestSuite(Test_init.class);
78 s.addTestSuite(Test_Validate.class);