4850c4412c813991dfcc331452210ad26ef80bb9
[captive-validator.git] / tests / com / verisign / tat / dnssec / CaptiveValidatorTest.java
1 package com.verisign.tat.dnssec;
2
3 import junit.framework.Test;
4 import junit.framework.TestCase;
5 import junit.framework.TestSuite;
6
7
8 public class CaptiveValidatorTest
9 {
10
11     public static class Test_init extends TestCase
12     {
13         protected void setUp() {
14             // Nothing to do yet.
15         }
16
17         public void test_0arg()
18         {
19             CaptiveValidator v = new CaptiveValidator();
20             assertNotNull(v);
21         }
22     }
23
24     public static class Test_Validate extends TestCase
25     {
26         Message baseMessage;
27
28         // Set up a base Response message
29         protected void setUp() {
30             baseMessage = new Message();
31
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);
43
44
45         }
46
47         public void test_positive()
48         {
49             Message m = new Message();
50         }
51
52         public void test_referral()
53         {
54         }
55
56         public void test_nodata()
57         {
58         }
59
60         public void test_nameerror()
61         {
62         }
63
64         public void test_cname()
65         {
66         }
67
68         public void test_any()
69         {
70         }
71     }
72
73
74     public static Test suite()
75     {
76         TestSuite s = new TestSuite();
77         s.addTestSuite(Test_init.class);
78         s.addTestSuite(Test_Validate.class);
79         return s;
80     }
81
82 }