KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > gui > propertyeditors > PropertyType_BooleanO


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 gui.propertyeditors;
21
22 import org.netbeans.junit.NbTestSuite;
23
24 /**
25  * Test of Boolean Property Editor.
26  *
27  * @author Marian.Mirilovic@Sun.Com
28  */

29 public class PropertyType_BooleanO extends PropertyEditorsTest {
30
31     public String JavaDoc propertyName_L;
32     public String JavaDoc propertyValue_L;
33
34     /** Creates a new instance of PropertyType_BooleanO */
35     public PropertyType_BooleanO(String JavaDoc testName) {
36         super(testName);
37     }
38
39
40     public void setUp(){
41         propertyName_L = "Boolean";
42         super.setUp();
43     }
44
45     public static NbTestSuite suite() {
46         NbTestSuite suite = new NbTestSuite();
47         suite.addTest(new PropertyType_BooleanO("testByComboTrue"));
48         suite.addTest(new PropertyType_BooleanO("testByComboFalse"));
49         return suite;
50     }
51     
52     public void testByComboFalse(){
53         propertyValue_L = Boolean.FALSE.toString();
54         setByCombo(propertyName_L, propertyValue_L, true);
55     }
56     
57     public void testByComboTrue(){
58         propertyValue_L = Boolean.TRUE.toString();
59         setByCombo(propertyName_L, propertyValue_L, true);
60     }
61     
62     public void verifyPropertyValue(boolean expectation) {
63         verifyExpectationValue(propertyName_L,expectation, propertyValue_L, propertyValue_L, false);
64     }
65     
66     public void setCustomizerValue(){}
67     public void verifyCustomizerLayout(){}
68     
69     /** Test could be executed internaly in Forte without XTest
70      * @param args arguments from command line
71      */

72     public static void main(String JavaDoc[] args) {
73         //junit.textui.TestRunner.run(new NbTestSuite(PropertyType_BooleanO.class));
74
junit.textui.TestRunner.run(suite());
75     }
76 }
77
Popular Tags