KickJava   Java API By Example, From Geeks To Geeks.

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


1 package xdoclet.retest.test;
2
3 import xdoclet.retest.util.ClassComparator;
4 import xdoclet.retest.util.ComparisonResultSet;
5 import junit.framework.Test;
6 import junit.framework.TestSuite;
7
8 /**
9  * @author Vincent Harcq (vincent.harcq@hubmethods.com)
10  * @created Mars 5, 2002
11  * @version $Revision: 1.3 $
12  */

13 public class SessionBeanRegressionTestCase
14         extends EnterpriseJavaBeanRegressionTestCase
15 {
16
17     public SessionBeanRegressionTestCase(String JavaDoc name)
18     {
19         super(name);
20     }
21
22     public SessionBeanRegressionTestCase(String JavaDoc name,String JavaDoc cn)
23     {
24         super(name,cn);
25     }
26
27     public Test getSuite()
28     {
29         TestSuite suite = new TestSuite();
30         Test t = super.getSuite();
31         suite.addTest(t);
32         suite.addTest(new SessionBeanRegressionTestCase("testImpl",getClassName()));
33         return suite;
34     }
35
36     public void testImpl()
37     throws Exception JavaDoc
38     {
39         ClassComparator comparator;
40         ComparisonResultSet res;
41         Class JavaDoc ref = Class.forName(refBase+ ".ejb." + getClassName() + "Session");
42         Class JavaDoc gen = Class.forName(genBase+ ".ejb." + getClassName() + "Session");
43         comparator = new ClassComparator(ref,gen);
44         res = comparator.compare();
45         if (res.error()) System.out.println(res.toString());
46         assertTrue("Home Interface comparison failed "+res, ! res.error());
47     }
48
49 }
50
Popular Tags