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