01: package abbot.tester;
02:
03: import java.awt.Point;
04:
05: import junit.extensions.abbot.TestHelper;
06: import junit.framework.TestCase;
07:
08: public class ComponentLocationTest extends TestCase {
09:
10: public void testParsePoint() {
11: ComponentLocation loc = new ComponentLocation();
12: String parse = "(1,1)";
13: assertEquals("Badly parsed: " + parse, new ComponentLocation(
14: new Point(1, 1)), loc.parse(parse));
15: parse = " ( 10 , 20 ) ";
16: assertEquals("Badly parsed: " + parse, new ComponentLocation(
17: new Point(10, 20)), loc.parse(parse));
18: }
19:
20: public ComponentLocationTest(String name) {
21: super (name);
22: }
23:
24: public static void main(String[] args) {
25: TestHelper.runTests(args, ComponentLocationTest.class);
26: }
27: }
|