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 org.netbeans.upgrade.systemoptions;
043:
044: /**
045: * @author Radek Matous
046: */
047: public class FormSettingsTest extends BasicTestForImport {
048: public FormSettingsTest(String testName) {
049: super (testName, "formsettings.settings");
050: }
051:
052: public void testPreferencesNodePath() throws Exception {
053: assertPreferencesNodePath("/org/netbeans/modules/form");
054: }
055:
056: public void testPropertyNames() throws Exception {
057: assertPropertyNames(new String[] { "applyGridToPosition",
058: "applyGridToSize", "connectionBorderColor",
059: "displayWritableOnly", "dragBorderColor",
060: "editorSearchPath", "eventVariableName",
061: "foldGeneratedCode", "formDesignerBackgroundColor",
062: "formDesignerBorderColor", "generateMnemonicsCode",
063: "gridX", "gridY", "guidingLineColor",
064: "layoutCodeTarget", "listenerGenerationStyle",
065: "registeredEditors", "selectionBorderColor",
066: "selectionBorderSize", "toolBarPalette",
067: "useIndentEngine", "variablesLocal",
068: "variablesModifier" });
069: }
070:
071: public void testApplyGridToSize() throws Exception {
072: assertProperty("applyGridToSize", "true");
073: }
074:
075: public void testDisplayWritableOnly() throws Exception {
076: assertProperty("displayWritableOnly", "true");
077: }
078:
079: public void testEventVariableName() throws Exception {
080: assertProperty("eventVariableName", "evt");
081: }
082:
083: public void testFoldGeneratedCode() throws Exception {
084: assertProperty("foldGeneratedCode", "true");
085: }
086:
087: public void testGenerateMnemonicsCode() throws Exception {
088: assertProperty("generateMnemonicsCode", "false");
089: }
090:
091: public void testGridX() throws Exception {
092: assertProperty("gridX", "10");
093: }
094:
095: public void testGridY() throws Exception {
096: assertProperty("gridY", "10");
097: }
098:
099: public void testListenerGenerationStyle() throws Exception {
100: assertProperty("listenerGenerationStyle", "0");
101: }
102:
103: public void testlayoutCodeTarget() throws Exception {
104: assertProperty("layoutCodeTarget", "0");
105: }
106:
107: public void testSelectionBorderSize() throws Exception {
108: assertProperty("selectionBorderSize", "1");
109: }
110:
111: public void testToolBarPalette() throws Exception {
112: assertProperty("toolBarPalette", "true");
113: }
114:
115: public void testUseIndentEngine() throws Exception {
116: assertProperty("useIndentEngine", "false");
117: }
118:
119: public void testVariablesLocal() throws Exception {
120: assertProperty("variablesLocal", "true");
121: }
122:
123: public void testVariablesModifie() throws Exception {
124: assertProperty("variablesModifier", "0");
125: }
126:
127: public void testApplyGridToPosition() throws Exception {
128: assertProperty("applyGridToPosition", "true");
129: }
130:
131: public void testEditorSearchPath() throws Exception {
132: assertProperty("editorSearchPath",
133: "org.netbeans.modules.form.editors2");
134: }
135:
136: public void testRegisteredEditors() throws Exception {
137: assertProperty("registeredEditors", "aaaaaaa | bbbbbbbbb");
138: }
139:
140: public void testConnectionBorderColor() throws Exception {
141: assertProperty("connectionBorderColor", "-16776961");
142: }
143:
144: public void testDragBorderColor() throws Exception {
145: assertProperty("dragBorderColor", "-8355712");
146: }
147:
148: public void testFormDesignerBackgroundColor() throws Exception {
149: assertProperty("formDesignerBackgroundColor", "-1");
150: }
151:
152: public void testFormDesignerBorderColor() throws Exception {
153: assertProperty("formDesignerBorderColor", "-2039553");
154: }
155:
156: public void testGuidingLineColor() throws Exception {
157: assertProperty("guidingLineColor", "-7361596");
158: }
159:
160: public void testSelectionBorderColor() throws Exception {
161: assertProperty("selectionBorderColor", "-23552");
162: }
163: }
|