KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > modules > junit > TestsActionTest


1 /*
2  * The contents of this file are subject to the terms of the Common Development
3  * and Distribution License (the License). You may not use this file except in
4  * compliance with the License.
5  *
6  * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
7  * or http://www.netbeans.org/cddl.txt.
8  *
9  * When distributing Covered Code, include this CDDL Header Notice in each file
10  * and include the License file at http://www.netbeans.org/cddl.txt.
11  * If applicable, add the following below the CDDL Header, with the fields
12  * enclosed by brackets [] replaced by your own identifying information:
13  * "Portions Copyrighted [year] [name of copyright owner]"
14  *
15  * The Original Software is NetBeans. The Initial Developer of the Original
16  * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
17  * Microsystems, Inc. All Rights Reserved.
18  */

19
20 package org.netbeans.modules.junit;
21
22 import java.awt.event.ActionEvent JavaDoc;
23 import java.awt.Component JavaDoc;
24 import javax.swing.*;
25 import org.openide.util.HelpCtx;
26 import org.openide.util.NbBundle;
27 import org.openide.util.actions.Presenter;
28 import org.openide.util.actions.SystemAction;
29 import junit.framework.*;
30
31 public class TestsActionTest extends TestCase {
32
33     public TestsActionTest(java.lang.String JavaDoc testName) {
34         super(testName);
35     }
36
37     public static void main(java.lang.String JavaDoc[] args) {
38         junit.textui.TestRunner.run(suite());
39     }
40     
41     public static Test suite() {
42         TestSuite suite = new TestSuite(TestsActionTest.class);
43         
44         return suite;
45     }
46     
47     /** Test of actionPerformed method, of class org.netbeans.modules.junit.TestsAction. */
48     public void testActionPerformed() {
49         System.out.println("testActionPerformed");
50         // there is nothing to test, the actionPerformed is never called for TestsAction
51
}
52     
53     /** Test of getName method, of class org.netbeans.modules.junit.TestsAction. */
54     public void testGetName() {
55         System.out.println("testGetName");
56         String JavaDoc name = TO.getName();
57         assertTrue(null != name);
58     }
59     
60     /** Test of iconResource method, of class org.netbeans.modules.junit.TestsAction. */
61     public void testIconResource() {
62         System.out.println("testIconResource");
63         String JavaDoc icon = TO.iconResource();
64         assertTrue(null != icon);
65     }
66     
67     /** Test of getHelpCtx method, of class org.netbeans.modules.junit.TestsAction. */
68     public void testGetHelpCtx() {
69         System.out.println("testGetHelpCtx");
70         HelpCtx hc = TO.getHelpCtx();
71         assertTrue(null != hc);
72     }
73     
74     /** Test of getMenuPresenter method, of class org.netbeans.modules.junit.TestsAction. */
75     public void testGetMenuPresenter() {
76         System.out.println("testGetMenuPresenter");
77         JMenuItem jm = TO.getMenuPresenter();
78         assertTrue(null != jm);
79     }
80     
81     /** Test of getPopupPresenter method, of class org.netbeans.modules.junit.TestsAction. */
82     public void testGetPopupPresenter() {
83         System.out.println("testGetPopupPresenter");
84         JMenuItem jm = TO.getPopupPresenter();
85         assertTrue(null != jm);
86     }
87     
88     /** Test of getToolbarPresenter method, of class org.netbeans.modules.junit.TestsAction. */
89     public void testGetToolbarPresenter() {
90         System.out.println("testGetToolbarPresenter");
91         Component JavaDoc c = TO.getToolbarPresenter();
92         assertTrue(null != c);
93     }
94     
95     /* protected members */
96     protected CreateTestAction TO = null;
97     
98     protected void setUp() {
99         if (null == TO)
100             TO = (CreateTestAction)CreateTestAction.findObject(CreateTestAction.class, true);
101     }
102
103     protected void tearDown() {
104     }
105 }
106
Popular Tags