KickJava   Java API By Example, From Geeks To Geeks.

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


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 org.openide.*;
23 import org.openide.nodes.*;
24 import org.openide.util.HelpCtx;
25 import org.openide.util.NbBundle;
26 import org.openide.util.actions.CookieAction;
27 import org.openide.loaders.*;
28 import org.openide.src.*;
29 import org.openide.filesystems.*;
30 import org.openide.cookies.*;
31 import org.openide.execution.*;
32 import org.openide.debugger.*;
33 import org.openide.compiler.*;
34 import org.openide.compiler.Compiler;
35 import java.lang.reflect.*;
36 import java.util.*;
37 import java.io.*;
38 import junit.framework.*;
39
40 public class RunTestActionTest extends TestCase {
41     
42     public RunTestActionTest(java.lang.String JavaDoc testName) {
43         super(testName);
44     }
45     
46     public static void main(java.lang.String JavaDoc[] args) {
47         junit.textui.TestRunner.run(suite());
48     }
49     
50     public static Test suite() {
51         TestSuite suite = new TestSuite(RunTestActionTest.class);
52         
53         return suite;
54     }
55     
56     /** Test of getName method, of class org.netbeans.modules.junit.RunTestAction. */
57     public void testGetName() {
58         System.out.println("testGetName");
59         String JavaDoc name = TO.getName();
60         assertTrue(null != name);
61     }
62     
63     /** Test of getHelpCtx method, of class org.netbeans.modules.junit.RunTestAction. */
64     public void testGetHelpCtx() {
65         System.out.println("testGetHelpCtx");
66         HelpCtx hc = TO.getHelpCtx();
67         assertTrue(null != hc);
68     }
69     
70     /** Test of cookieClasses method, of class org.netbeans.modules.junit.RunTestAction. */
71     public void testCookieClasses() {
72         System.out.println("testCookieClasses");
73         Class JavaDoc[] c = TO.cookieClasses();
74         assertTrue(null != c);
75     }
76     
77     /** Test of iconResource method, of class org.netbeans.modules.junit.RunTestAction. */
78     public void testIconResource() {
79         System.out.println("testIconResource");
80         String JavaDoc icon = TO.iconResource();
81         assertTrue(null != icon);
82     }
83     
84     /** Test of mode method, of class org.netbeans.modules.junit.RunTestAction. */
85     public void testMode() {
86         System.out.println("testMode");
87         TO.mode();
88     }
89     
90     /** Test of performAction method, of class org.netbeans.modules.junit.RunTestAction. */
91     public void testPerformAction() {
92         System.out.println("testPerformAction");
93         
94         // Add your test code below by replacing the default call to fail.
95
fail("The test case is empty.");
96     }
97     
98     /* protected members */
99     protected CreateTestAction TO = null;
100     
101     protected void setUp() {
102         if (null == TO)
103             TO = (CreateTestAction)CreateTestAction.findObject(CreateTestAction.class, true);
104     }
105
106     protected void tearDown() {
107     }
108 }
109
Popular Tags