KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > modules > j2ee > sun > ide > editors > ui > MessageAreaTest


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.j2ee.sun.ide.editors.ui;
21
22 import java.awt.Color JavaDoc;
23 import java.awt.Font JavaDoc;
24 import java.util.ArrayList JavaDoc;
25 import java.util.List JavaDoc;
26 import junit.framework.TestCase;
27
28 /**
29  *
30  * @author vkraemer
31  */

32 public class MessageAreaTest extends TestCase {
33
34     public void testCoverage() {
35         MessageArea ma = new MessageArea();
36         ma = new MessageArea("foolish text");
37         ma = new MessageArea("");
38         // not null safe
39
//ma = new MessageArea(null);
40
ma.addNotify();
41         //ma.setWidth(100);
42
List JavaDoc l = new ArrayList JavaDoc();
43         l.add("a");
44         l.add("b");
45         ma.setBulletItems("");
46         // compile error
47
// ma.setBulletItems(null);
48
ma.setBulletItems("item1 item2 item3");
49         ma.setBulletItems(new String JavaDoc[] { "item1", "item2", "item3" });
50         ma.setBulletItems(new String JavaDoc[] { null });
51         ma.setBulletItems(l);
52         l.add(null);
53         ma.setBulletItems(l);
54         ma.setEndText("end text");
55         ma.setEndText("");
56         // not safe
57
//ma.setEndText(null);
58
ma.appendBulletItem("item4 item5 item6");
59         ma.appendBulletItems(new String JavaDoc[] { "item7", "item8", "item9" });
60         ma.appendBulletItems(new String JavaDoc[] { null });
61         ma.appendBulletItems(l);
62         ma.appendText("a b c");
63         ma.setForeground(Color.CYAN);
64         ma.setFont(Font.decode("ARIAL Bold 18"));
65         ma.setText("a b c");
66         ma.setWidth(100);
67         ma.addNotify();
68      }
69     
70     public MessageAreaTest(String JavaDoc testName) {
71         super(testName);
72     }
73     
74     /**
75      * Test of addNotify method, of class org.netbeans.modules.j2ee.sun.ide.editors.ui.MessageArea.
76      *
77     public void testAddNotify() {
78         System.out.println("testAddNotify");
79         
80         // TODO add your test code below by replacing the default call to fail.
81         fail("The test case is empty.");
82     }
83     
84     /**
85      * Test of setWidth method, of class org.netbeans.modules.j2ee.sun.ide.editors.ui.MessageArea.
86      *
87     public void testSetWidth() {
88         System.out.println("testSetWidth");
89         
90         // TODO add your test code below by replacing the default call to fail.
91         fail("The test case is empty.");
92     }
93     
94     /**
95      * Test of setFont method, of class org.netbeans.modules.j2ee.sun.ide.editors.ui.MessageArea.
96      *
97     public void testSetFont() {
98         System.out.println("testSetFont");
99         
100         // TODO add your test code below by replacing the default call to fail.
101         fail("The test case is empty.");
102     }
103     
104     /**
105      * Test of setForeground method, of class org.netbeans.modules.j2ee.sun.ide.editors.ui.MessageArea.
106      *
107     public void testSetForeground() {
108         System.out.println("testSetForeground");
109         
110         // TODO add your test code below by replacing the default call to fail.
111         fail("The test case is empty.");
112     }
113     
114     /**
115      * Test of setText method, of class org.netbeans.modules.j2ee.sun.ide.editors.ui.MessageArea.
116      *
117     public void testSetText() {
118         System.out.println("testSetText");
119         
120         // TODO add your test code below by replacing the default call to fail.
121         fail("The test case is empty.");
122     }
123     
124     /**
125      * Test of setEndText method, of class org.netbeans.modules.j2ee.sun.ide.editors.ui.MessageArea.
126      *
127     public void testSetEndText() {
128         System.out.println("testSetEndText");
129         
130         // TODO add your test code below by replacing the default call to fail.
131         fail("The test case is empty.");
132     }
133     
134     /**
135      * Test of appendText method, of class org.netbeans.modules.j2ee.sun.ide.editors.ui.MessageArea.
136      *
137     public void testAppendText() {
138         System.out.println("testAppendText");
139         
140         // TODO add your test code below by replacing the default call to fail.
141         fail("The test case is empty.");
142     }
143     
144     /**
145      * Test of setBulletItems method, of class org.netbeans.modules.j2ee.sun.ide.editors.ui.MessageArea.
146      *
147     public void testSetBulletItems() {
148         System.out.println("testSetBulletItems");
149         
150         // TODO add your test code below by replacing the default call to fail.
151         fail("The test case is empty.");
152     }
153     
154     /**
155      * Test of appendBulletItem method, of class org.netbeans.modules.j2ee.sun.ide.editors.ui.MessageArea.
156      *
157     public void testAppendBulletItem() {
158         System.out.println("testAppendBulletItem");
159         
160         // TODO add your test code below by replacing the default call to fail.
161         fail("The test case is empty.");
162     }
163     
164     /**
165      * Test of appendBulletItems method, of class org.netbeans.modules.j2ee.sun.ide.editors.ui.MessageArea.
166      *
167     public void testAppendBulletItems() {
168         System.out.println("testAppendBulletItems");
169         
170         // TODO add your test code below by replacing the default call to fail.
171         fail("The test case is empty.");
172     }
173     
174     */

175     
176 }
177
Popular Tags