01: package abbot.editor;
02:
03: import java.awt.Component;
04: import javax.swing.*;
05: import junit.framework.*;
06: import junit.extensions.abbot.*;
07:
08: public class ComponentTreeIconsTest extends TestCase {
09:
10: public void testBasicComponents() {
11: Component[] comps = { new JFrame(getName()),
12: new JWindow(new JFrame()), new JDialog(new JFrame()) };
13: for (int i = 0; i < comps.length; i++) {
14: assertTrue("No icon found for " + comps[i].getClass(),
15: icons.getIcon(comps[i].getClass()) != null);
16: }
17: }
18:
19: private ComponentTreeIcons icons;
20:
21: protected void setUp() {
22: icons = new ComponentTreeIcons();
23: }
24:
25: public ComponentTreeIconsTest(String name) {
26: super (name);
27: }
28:
29: public static void main(String[] args) {
30: TestHelper.runTests(args, ComponentTreeIconsTest.class);
31: }
32: }
|