KickJava   Java API By Example, From Geeks To Geeks.

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


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  * $Header: /cvs/glassfish/admin/mbeans/tests/com/sun/enterprise/admin/dottedname/DottedNameTestsMain.java,v 1.3 2005/12/25 03:43:07 tcfujii Exp $
26  * $Revision: 1.3 $
27  * $Date: 2005/12/25 03:43:07 $
28  */

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