KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > net > firstpartners > nounit > report > process > test > TestCallChainer


1 package net.firstpartners.nounit.report.process.test;
2
3 /**
4  * Title: NoUnit - Identify Classes that are not being unit Tested
5  *
6  * Copyright (C) 2001 Paul Browne , FirstPartners.net
7  *
8  *
9  * This program is free software; you can redistribute it and/or
10  * modify it under the terms of the GNU General Public License
11  * as published by the Free Software Foundation; either version 2
12  * of the License, or (at your option) any later version.
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  * GNU General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with this program; if not, write to the Free Software
21  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
22  *
23  * @author Paul Browne
24  * @version 0.7
25  */

26
27 import java.io.File JavaDoc;
28
29 import junit.framework.Test;
30 import junit.framework.TestCase;
31 import junit.framework.TestSuite;
32 import net.firstpartners.nounit.report.CallsReport;
33 import net.firstpartners.nounit.report.process.CallChainer;
34 import net.firstpartners.nounit.test.TestData;
35
36 /**
37  * Tests the functions in the Class
38  */

39 public class TestCallChainer extends TestCase{
40     
41     /**
42      * Constructor Required by Junit
43      * @param name
44      */

45     public TestCallChainer(String JavaDoc name) {
46         super(name);
47     }
48     
49     /**
50      * Method to setup logging test
51      */

52     public void setUp() {
53         
54     }
55     
56     /**
57      * Enable Junit to run this Class individually
58      * @param args
59      */

60     public static void main(String JavaDoc[] args) {
61         junit.textui.TestRunner.run(suite());
62     }
63     
64     /**
65      * Enable Junit to run this class
66      * @return TestDataCaptureDefaults.class
67      */

68     public static Test suite() {
69         return new TestSuite(TestCallChainer.class);
70     }
71     
72     /**
73      * Test the conversion of the XML Tree
74      */

75     public void testConversion() throws Exception JavaDoc {
76         String JavaDoc classMustExtend = CallsReport.classMustExtend;
77         File JavaDoc in = new File JavaDoc( TestData.XML_SIMPLE_OUTPUT );
78         File JavaDoc out = new File JavaDoc( TestData.XML_CALLS_OUTPUT );
79         CallChainer myProcessor = new CallChainer();
80         myProcessor.addCallChainInformation( in, out, classMustExtend);
81     }
82 }
83
Popular Tags