01: package abbot.finder;
02:
03: import javax.swing.*;
04:
05: import junit.extensions.abbot.*;
06: import abbot.finder.matchers.*;
07:
08: public class AWTHierarchyTest extends ComponentTestFixture {
09:
10: protected Hierarchy createHierarchy() {
11: return new TestHierarchy();
12: }
13:
14: public void testFindScrollBars() throws Exception {
15: JScrollPane pane = new JScrollPane(new JLabel(getName()));
16: try {
17: getFinder().find(pane, new ClassMatcher(JScrollBar.class));
18: } catch (ComponentNotFoundException e) {
19: fail("ScrollBar not reachable");
20: }
21: }
22:
23: public AWTHierarchyTest(String name) {
24: super (name);
25: }
26:
27: public static void main(String[] args) {
28: RepeatHelper.runTests(args, AWTHierarchyTest.class);
29: }
30: }
|