KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > enterprise > admin > dottedname > TestsMain


1 /*
2  * The contents of this file are subject to the terms
3  * of the Common Development and Distribution License
4  * (the License). You may not use this file except in
5  * compliance with the License.
6  *
7  * You can obtain a copy of the license at
8  * https://glassfish.dev.java.net/public/CDDLv1.0.html or
9  * glassfish/bootstrap/legal/CDDLv1.0.txt.
10  * See the License for the specific language governing
11  * permissions and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL
14  * Header Notice in each file and include the License file
15  * at glassfish/bootstrap/legal/CDDLv1.0.txt.
16  * If applicable, add the following below the CDDL Header,
17  * with the fields enclosed by brackets [] replaced by
18  * you own identifying information:
19  * "Portions Copyrighted [year] [name of copyright owner]"
20  *
21  * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
22  */

23
24  
25
26 /*
27  * $Header: /cvs/glassfish/admin/mbeans/tests/com/sun/enterprise/admin/dottedname/TestsMain.java,v 1.3 2005/12/25 03:43:10 tcfujii Exp $
28  * $Revision: 1.3 $
29  * $Date: 2005/12/25 03:43:10 $
30  */

31
32  
33
34 package com.sun.enterprise.admin.dottedname;
35
36
37 import java.util.Iterator JavaDoc;
38 import java.util.Arrays JavaDoc;
39
40 import junit.extensions.ActiveTestSuite;
41
42
43 public class TestsMain
44 {
45     final static Class JavaDoc [] TEST_CLASSES =
46     {
47         DottedNameTest.class,
48         DottedNameRegistryTest.class,
49         DottedNameFactoryTest.class,
50         DottedNameGetSetMBeanImplTest.class,
51     };
52
53         static void
54     testClass( Class JavaDoc theClass )
55     {
56         System.out.println( "*** testing " + theClass.getName() + " ***");
57         // use 'ActiveTestSuite' to thread the tests
58
final ActiveTestSuite suite = new ActiveTestSuite( theClass );
59         junit.textui.TestRunner.run( suite );
60     }
61
62     
63
64         public static void
65     main( String JavaDoc [] args )
66     {
67         final Iterator JavaDoc iter = Arrays.asList( TEST_CLASSES ).iterator();
68
69         while ( iter.hasNext() )
70         {
71             final Class JavaDoc theClass = (Class JavaDoc)iter.next();
72
73             testClass( theClass );
74         }
75     }
76 }
77
78
79
80
81
82
Popular Tags