KickJava   Java API By Example, From Geeks To Geeks.

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


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