KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > xdoclet > retest > test > DDEjbJarTestCase


1 package xdoclet.retest.test;
2
3 import junit.framework.TestSuite;
4 import junit.framework.Test;
5 import org.w3c.dom.Node JavaDoc;
6 import xdoclet.retest.util.XMLComparator;
7 import xdoclet.retest.util.ComparisonResultSet;
8
9 import java.io.FileNotFoundException JavaDoc;
10
11 /**
12  * @author Vincent Harcq (vincent.harcq@hubmethods.com)
13  * @created Mars 5, 2002
14  * @version $Revision: 1.2 $
15  */

16 public class DDEjbJarTestCase
17         extends XmlRegressionTestCase
18 {
19     public DDEjbJarTestCase(String JavaDoc name)
20     {
21         super(name);
22     }
23
24     public DDEjbJarTestCase(String JavaDoc name,String JavaDoc cn)
25     {
26         super(name,cn);
27     }
28
29     public Test getSuite()
30     {
31         TestSuite suite = new TestSuite();
32         suite.addTest(new DDEjbJarTestCase("testEjbJarXml",getClassName()));
33         return suite;
34     }
35
36     public void testEjbJarXml()
37     throws Exception JavaDoc
38     {
39         Node JavaDoc one = readReferenceNode("ejb-jar.xml");
40         Node JavaDoc two = readGeneratedNode("ejb-jar.xml");
41         XMLComparator comp = new XMLComparator(one,two);
42         comp.setAttributeValidation(false);
43         ComparisonResultSet res = comp.compare();
44         if (res.error()) System.out.println(res.toString());
45         assertTrue("ejb-jar.xml comparison failed "+res, ! res.error());
46     }
47
48 }
49
Popular Tags