public void runTest() throws ParseException { failed = false; isRun = true; initGeometry(); if (expectedIM != null) { IntersectionMatrix im = null; if (geom[0] != null && geom[1] != null) { im = relate(geom[0], geom[1]); } if (im != null) { String msg = " expected " + expectedIM + ", found " + im.toString(); assertTrue(im.matches(expectedIM), msg); } } if (expectedBoundary != null) { Geometry result = geom[0].getBoundary(); assertEqualsExact( expectedBoundary, result, " expected boundary " + expectedBoundary.toText() + " , found " + result.toText()); } if (expectedConvexHull != null) { Geometry result = geom[0].convexHull(); assertEqualsExact( expectedConvexHull, result, " expected convex hull " + expectedConvexHull.toText() + " , found " + result.toText()); } if (expectedIntersection != null) { Geometry result = geom[0].intersection(geom[1]); assertEqualsExact( expectedIntersection, result, " expected intersection " + expectedIntersection.toText() + " , found " + result.toText()); } if (expectedUnion != null) { Geometry result = geom[0].union(geom[1]); assertEqualsExact( expectedUnion, result, " expected union " + expectedUnion.toText() + " , found " + result.toText()); } if (expectedDifference != null) { Geometry result = geom[0].difference(geom[1]); assertEqualsExact( expectedDifference, result, " expected difference " + expectedDifference.toText() + " , found " + result.toText()); } if (expectedSymDifference != null) { Geometry result = geom[0].symDifference(geom[1]); assertEqualsExact( expectedSymDifference, result, " expected sym difference " + expectedSymDifference.toText() + " , found " + result.toText()); } }