001: /*
002: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
003: *
004: * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
005: *
006: * The contents of this file are subject to the terms of either the GNU
007: * General Public License Version 2 only ("GPL") or the Common
008: * Development and Distribution License("CDDL") (collectively, the
009: * "License"). You may not use this file except in compliance with the
010: * License. You can obtain a copy of the License at
011: * http://www.netbeans.org/cddl-gplv2.html
012: * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
013: * specific language governing permissions and limitations under the
014: * License. When distributing the software, include this License Header
015: * Notice in each file and include the License file at
016: * nbbuild/licenses/CDDL-GPL-2-CP. Sun designates this
017: * particular file as subject to the "Classpath" exception as provided
018: * by Sun in the GPL Version 2 section of the License file that
019: * accompanied this code. If applicable, add the following below the
020: * License Header, with the fields enclosed by brackets [] replaced by
021: * your own identifying information:
022: * "Portions Copyrighted [year] [name of copyright owner]"
023: *
024: * Contributor(s):
025: *
026: * The Original Software is NetBeans. The Initial Developer of the Original
027: * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
028: * Microsystems, Inc. All Rights Reserved.
029: *
030: * If you wish your version of this file to be governed by only the CDDL
031: * or only the GPL Version 2, indicate your decision by adding
032: * "[Contributor] elects to include this software in this distribution
033: * under the [CDDL or GPL Version 2] license." If you do not indicate a
034: * single choice of license, a recipient has the option to distribute
035: * your version of this file under either the CDDL, the GPL Version 2 or
036: * to extend the choice of license to its licensees as provided above.
037: * However, if you add GPL Version 2 code and therefore, elected the GPL
038: * Version 2 license, then the option applies only if the new code is
039: * made subject to such option by the copyright holder.
040: */
041:
042: package gui.menu;
043:
044: import gui.Projects;
045: import org.netbeans.jellytools.nodes.Node;
046: import org.netbeans.junit.NbTestSuite;
047:
048: /**
049: *
050: * @author mkhramov@netbeans.org
051: */
052:
053: public class ScriptingNodePopup extends ProjectsViewPopupMenu {
054: private String testProject;
055: private String docName;
056: private String pathName;
057:
058: public ScriptingNodePopup(String testName) {
059: super (testName);
060: expectedTime = 100;
061: }
062:
063: public ScriptingNodePopup(String testName,
064: String performanceDataName) {
065: super (testName, performanceDataName);
066: expectedTime = 100;
067: }
068:
069: public static NbTestSuite suite() {
070: NbTestSuite suite = new NbTestSuite();
071: suite.addTest(new ScriptingNodePopup("test_RB_NodePopup",
072: " Ruby file node popup test"));
073: suite.addTest(new ScriptingNodePopup("test_RHTML_NodePopup",
074: "RHTML file node popup test"));
075: suite.addTest(new ScriptingNodePopup("test_YML_NodePopup",
076: "YML file node popup test"));
077: suite.addTest(new ScriptingNodePopup("test_JS_NodePopup",
078: "Java Script file node popup test"));
079: suite.addTest(new ScriptingNodePopup("test_JSON_NodePopup",
080: "JSON file node popup test"));
081: suite.addTest(new ScriptingNodePopup("test_CSS_NodePopup",
082: "CSS file node popup test"));
083: suite.addTest(new ScriptingNodePopup("test_BAT_NodePopup",
084: "Batch script file node popup test"));
085: suite.addTest(new ScriptingNodePopup("test_DIFF_NodePopup",
086: "Diff file node popup test"));
087: suite.addTest(new ScriptingNodePopup("test_MANIFEST_NodePopup",
088: "Manifest file node popup test"));
089: suite.addTest(new ScriptingNodePopup("test_SH_NodePopup",
090: "Shell Script file node popup test"));
091: return suite;
092: }
093:
094: public void test_RB_NodePopup() {
095: testProject = Projects.RUBY_PROJECT;
096: pathName = "";
097: docName = "ruby20kb.rb";
098: testNode(new Node(getProjectNode(testProject), "Source Files"
099: + "|" + docName));
100: }
101:
102: public void test_RHTML_NodePopup() {
103: testProject = Projects.RAILS_PROJECT;
104: pathName = "";
105: docName = "rhtml20kb.rhtml";
106: testNode(new Node(getProjectNode(testProject), "Views" + "|"
107: + docName));
108: }
109:
110: public void test_YML_NodePopup() {
111: testProject = Projects.RAILS_PROJECT;
112: pathName = "";
113: docName = "yaml20kb.yml";
114: testNode(new Node(getProjectNode(testProject), "Configuration"
115: + "|" + docName));
116: }
117:
118: public void test_JS_NodePopup() {
119: testProject = Projects.SCRIPTING_PROJECT;
120: pathName = "";
121: docName = "javascript20kb.js";
122: testNode(new Node(getProjectNode(testProject), "Web Pages"
123: + "|" + docName));
124: }
125:
126: public void test_JSON_NodePopup() {
127: testProject = Projects.SCRIPTING_PROJECT;
128: pathName = "";
129: docName = "json20kb.json";
130: testNode(new Node(getProjectNode(testProject), "Web Pages"
131: + "|" + docName));
132: }
133:
134: public void test_CSS_NodePopup() {
135: testProject = Projects.SCRIPTING_PROJECT;
136: pathName = "";
137: docName = "css20kb.css";
138: testNode(new Node(getProjectNode(testProject), "Web Pages"
139: + "|" + docName));
140: }
141:
142: public void test_BAT_NodePopup() {
143: testProject = Projects.SCRIPTING_PROJECT;
144: pathName = "";
145: docName = "bat20kb.bat";
146: testNode(new Node(getProjectNode(testProject), "Web Pages"
147: + "|" + docName));
148: }
149:
150: public void test_DIFF_NodePopup() {
151: testProject = Projects.SCRIPTING_PROJECT;
152: pathName = "";
153: docName = "diff20kb.diff";
154: testNode(new Node(getProjectNode(testProject), "Web Pages"
155: + "|" + docName));
156: }
157:
158: public void test_MANIFEST_NodePopup() {
159: testProject = Projects.SCRIPTING_PROJECT;
160: pathName = "";
161: docName = "manifest20kb.mf";
162: testNode(new Node(getProjectNode(testProject), "Web Pages"
163: + "|" + docName));
164: }
165:
166: public void test_SH_NodePopup() {
167: testProject = Projects.SCRIPTING_PROJECT;
168: pathName = "";
169: docName = "sh20kb.sh";
170: testNode(new Node(getProjectNode(testProject), "Web Pages"
171: + "|" + docName));
172: }
173: }
|