|
1
|
|
package abbot.editor;
|
|
2
|
|
|
|
3
|
|
import java.awt.Component;
|
|
4
|
|
import javax.swing.JTree;
|
|
5
|
|
import java.lang.reflect.Method;
|
|
6
|
|
import java.util.*;
|
|
7
|
|
|
|
8
|
|
import junit.extensions.abbot.*;
|
|
9
|
|
import junit.framework.TestCase;
|
|
10
|
|
import abbot.script.ArgumentParser;
|
|
11
|
|
|
|
12
|
|
public class ComponentPropertyModelTest extends ComponentTestFixture {
|
|
13
|
|
|
|
14
|
1
|
public void testFilterTesterMethods() {
|
|
15
|
1
|
ComponentPropertyModel model = new ComponentPropertyModel();
|
|
16
|
1
|
Method[] methods = model.getPropertyMethods(Component.class, false);
|
|
17
|
1
|
List list = Arrays.asList(methods);
|
|
18
|
1
|
String[] filtered = { "getTag", "getTester" };
|
|
19
|
1
|
for (int i=0;i < filtered.length;i++) {
|
|
20
|
2
|
assertTrue(filtered[i] + " not filtered",
|
|
21
|
|
!list.contains(filtered[i]));
|
|
22
|
|
}
|
|
23
|
|
}
|
|
24
|
|
|
|
25
|
|
|
|
26
|
1
|
public ComponentPropertyModelTest(String name) { super(name); }
|
|
27
|
|
|
|
28
|
|
|
|
29
|
0
|
public static void main(String[] args) {
|
|
30
|
0
|
TestHelper.runTests(args, ComponentPropertyModelTest.class);
|
|
31
|
|
}
|
|
32
|
|
}
|
|
33
|
|
|