Revision 38785 branches/v2_0_0_prep/libraries/libFMap_geometries/src-test/org/gvsig/fmap/geom/primitive/ArcTest.java
ArcTest.java | ||
---|---|---|
60 | 60 |
e = e1; |
61 | 61 |
} |
62 | 62 |
Assert.assertTrue(e instanceof UnsupportedOperationException); |
63 |
|
|
64 |
Point center = (Point)manager.create(TYPES.POINT, SUBTYPES.GEOM2D); |
|
65 |
center.setCoordinateAt(0, 0); |
|
66 |
center.setCoordinateAt(1, 0); |
|
67 |
|
|
63 |
|
|
64 |
|
|
68 | 65 |
Point initPoint = (Point)manager.create(TYPES.POINT, SUBTYPES.GEOM2D); |
69 | 66 |
initPoint.setCoordinateAt(0, 1); |
70 | 67 |
initPoint.setCoordinateAt(1, 1); |
68 |
|
|
69 |
Point middle = (Point)manager.create(TYPES.POINT, SUBTYPES.GEOM2D); |
|
70 |
middle.setCoordinateAt(0, 0); |
|
71 |
middle.setCoordinateAt(1, 0); |
|
71 | 72 |
|
73 |
|
|
72 | 74 |
Point endPoint = (Point)manager.create(TYPES.POINT, SUBTYPES.GEOM2D); |
73 | 75 |
endPoint.setCoordinateAt(0, 0); |
74 | 76 |
endPoint.setCoordinateAt(1, 1); |
75 | 77 |
|
76 |
arc.setPoints(center, initPoint, endPoint);
|
|
78 |
arc.setPoints(initPoint, middle, endPoint);
|
|
77 | 79 |
|
78 | 80 |
assertEquals(0.5, arc.getCenterPoint().getX(), 0); |
79 |
assertEquals(0.5, arc.getCenterPoint().getX(), 0);
|
|
81 |
assertEquals(0.5, arc.getCenterPoint().getY(), 0);
|
|
80 | 82 |
assertEquals(1.0, arc.getInitPoint().getX(), 0); |
81 |
assertEquals(1.0, arc.getInitPoint().getX(), 0);
|
|
83 |
assertEquals(1.0, arc.getInitPoint().getY(), 0);
|
|
82 | 84 |
assertEquals(0, arc.getEndPoint().getX(), 0); |
83 |
assertEquals(0, arc.getEndPoint().getX(), 0);
|
|
85 |
assertEquals(1, arc.getEndPoint().getY(), 0);
|
|
84 | 86 |
} |
85 | 87 |
} |
86 | 88 |
|
Also available in: Unified diff