public static void testGetXCorrectCR185697() { com.esri.core.geometry.OperatorFactoryLocal engine = com.esri.core.geometry.OperatorFactoryLocal .getInstance(); com.esri.core.geometry.OperatorClip clipOp = (com.esri.core.geometry.OperatorClip )engine.getOperator(com.esri.core.geometry.Operator.Type.Clip); com.esri.core.geometry.Polyline polylineCR = makePolylineCR(); com.esri.core.geometry.SimpleGeometryCursor polylineCursCR = new com.esri.core.geometry.SimpleGeometryCursor (polylineCR); com.esri.core.geometry.SpatialReference gcsWGS84 = com.esri.core.geometry.SpatialReference .create(4326); com.esri.core.geometry.Envelope2D envelopeCR = new com.esri.core.geometry.Envelope2D (); envelopeCR.xmin = -180; envelopeCR.xmax = 180; envelopeCR.ymin = -90; envelopeCR.ymax = 90; // CR com.esri.core.geometry.Polyline clippedPolylineCR = (com.esri.core.geometry.Polyline )clipOp.execute(polylineCR, envelopeCR, gcsWGS84, null); com.esri.core.geometry.Point pointResult = new com.esri.core.geometry.Point(); clippedPolylineCR.getPointByVal(0, pointResult); NUnit.Framework.Assert.IsTrue(pointResult.getX() == -180); clippedPolylineCR.getPointByVal(1, pointResult); NUnit.Framework.Assert.IsTrue(pointResult.getX() == -90); clippedPolylineCR.getPointByVal(2, pointResult); NUnit.Framework.Assert.IsTrue(pointResult.getX() == 0); clippedPolylineCR.getPointByVal(3, pointResult); NUnit.Framework.Assert.IsTrue(pointResult.getX() == 100); clippedPolylineCR.getPointByVal(4, pointResult); NUnit.Framework.Assert.IsTrue(pointResult.getX() == 170); clippedPolylineCR.getPointByVal(5, pointResult); NUnit.Framework.Assert.IsTrue(pointResult.getX() == 180); }
public static void TestUnion_() { com.esri.core.geometry.Point pt = new com.esri.core.geometry.Point(10, 20); com.esri.core.geometry.Point pt2 = new com.esri.core.geometry.Point(); pt2.SetXY(10, 10); com.esri.core.geometry.Envelope env1 = new com.esri.core.geometry.Envelope(10, 10, 30, 50); com.esri.core.geometry.Envelope env2 = new com.esri.core.geometry.Envelope(30, 10, 60, 50); com.esri.core.geometry.Geometry[] geomArray = new com.esri.core.geometry.Geometry[] { env1, env2 }; com.esri.core.geometry.SimpleGeometryCursor inputGeometries = new com.esri.core.geometry.SimpleGeometryCursor(geomArray); com.esri.core.geometry.OperatorUnion union = (com.esri.core.geometry.OperatorUnion)com.esri.core.geometry.OperatorFactoryLocal.GetInstance().GetOperator(com.esri.core.geometry.Operator.Type.Union); com.esri.core.geometry.SpatialReference sr = com.esri.core.geometry.SpatialReference.Create(4326); com.esri.core.geometry.GeometryCursor outputCursor = union.Execute(inputGeometries, sr, null); com.esri.core.geometry.Geometry result = outputCursor.Next(); }
public virtual void TestIntersection1() { // OperatorFactoryLocal projEnv = OperatorFactoryLocal.getInstance(); // int codeIn = 26910;//NAD_1983_UTM_Zone_10N : GCS 6269 // int codeOut = 32610;//WGS_1984_UTM_Zone_10N; : GCS 4326 // int codeIn = SpatialReference::PCS_WGS_1984_UTM_10N; // int codeOut = SpatialReference::PCS_WORLD_MOLLWEIDE; // int codeOut = 102100; inputSR = com.esri.core.geometry.SpatialReference.Create(codeIn); NUnit.Framework.Assert.IsTrue(inputSR.GetID() == codeIn); outputSR = com.esri.core.geometry.SpatialReference.Create(codeOut); NUnit.Framework.Assert.IsTrue(outputSR.GetID() == codeOut); com.esri.core.geometry.OperatorIntersection operatorIntersection = (com.esri.core.geometry.OperatorIntersection)projEnv.GetOperator(com.esri.core.geometry.Operator.Type.Intersection); com.esri.core.geometry.Polygon poly1 = new com.esri.core.geometry.Polygon(); com.esri.core.geometry.Envelope env1 = new com.esri.core.geometry.Envelope(855277, 3892059, 855277 + 100, 3892059 + 100); // Envelope env1 = new Envelope(-1000000, -1000000, 1000000, 1000000); // env1.SetCoords(-8552770, -3892059, 855277 + 100, 3892059 + 100); poly1.AddEnvelope(env1, false); com.esri.core.geometry.Polygon poly2 = new com.esri.core.geometry.Polygon(); com.esri.core.geometry.Envelope env2 = new com.esri.core.geometry.Envelope(855277 + 1, 3892059 + 1, 855277 + 30, 3892059 + 20); poly2.AddEnvelope(env2, false); com.esri.core.geometry.GeometryCursor cursor1 = new com.esri.core.geometry.SimpleGeometryCursor(poly1); com.esri.core.geometry.GeometryCursor cursor2 = new com.esri.core.geometry.SimpleGeometryCursor(poly2); com.esri.core.geometry.GeometryCursor outputGeoms = operatorIntersection.Execute(cursor1, cursor2, inputSR, null); com.esri.core.geometry.Geometry geomr = outputGeoms.Next(); NUnit.Framework.Assert.IsNotNull(geomr); NUnit.Framework.Assert.IsTrue(geomr.GetType() == com.esri.core.geometry.Geometry.Type.Polygon); com.esri.core.geometry.Polygon geom = (com.esri.core.geometry.Polygon)geomr; NUnit.Framework.Assert.IsTrue(geom.GetPointCount() == 4); // com.esri.core.geometry.Point[] points = com.esri.core.geometry.TestCommonMethods.PointsFromMultiPath(geom); // // SPtrOfArrayOf(Point2D) // // pts = // // geom.get.getCoordinates2D(); // NUnit.Framework.Assert.IsTrue(System.Math.Abs(points[0].GetX() - 855278.000000000) < 1e-7); // NUnit.Framework.Assert.IsTrue(System.Math.Abs(points[0].GetY() - 3892060.0000000000) < 1e-7); // NUnit.Framework.Assert.IsTrue(System.Math.Abs(points[2].GetX() - 855307.00000000093) < 1e-7); // NUnit.Framework.Assert.IsTrue(System.Math.Abs(points[2].GetY() - 3892079.0000000000) < 1e-7); // geomr = operatorIntersection.Execute(poly1, poly2, inputSR, null); // NUnit.Framework.Assert.IsNotNull(geomr); // NUnit.Framework.Assert.IsTrue(geomr.GetType() == com.esri.core.geometry.Geometry.Type.Polygon); // com.esri.core.geometry.Polygon outputGeom = (com.esri.core.geometry.Polygon)geomr; // NUnit.Framework.Assert.IsTrue(outputGeom.GetPointCount() == 4); // points = com.esri.core.geometry.TestCommonMethods.PointsFromMultiPath(outputGeom); // NUnit.Framework.Assert.IsTrue(System.Math.Abs(points[0].GetX() - 855278.000000000) < 1e-7); // NUnit.Framework.Assert.IsTrue(System.Math.Abs(points[0].GetY() - 3892060.0000000000) < 1e-7); // NUnit.Framework.Assert.IsTrue(System.Math.Abs(points[2].GetX() - 855307.00000000093) < 1e-7); // NUnit.Framework.Assert.IsTrue(System.Math.Abs(points[2].GetY() - 3892079.0000000000) < 1e-7); }
public static void testUnion() { com.esri.core.geometry.Point pt = new com.esri.core.geometry.Point(10, 20); com.esri.core.geometry.Point pt2 = new com.esri.core.geometry.Point(); pt2.setXY(10, 10); com.esri.core.geometry.Envelope env1 = new com.esri.core.geometry.Envelope(10, 10 , 30, 50); com.esri.core.geometry.Envelope env2 = new com.esri.core.geometry.Envelope(30, 10 , 60, 50); com.esri.core.geometry.Geometry[] geomArray = new com.esri.core.geometry.Geometry [] { env1, env2 }; com.esri.core.geometry.SimpleGeometryCursor inputGeometries = new com.esri.core.geometry.SimpleGeometryCursor (geomArray); com.esri.core.geometry.OperatorUnion union = (com.esri.core.geometry.OperatorUnion )com.esri.core.geometry.OperatorFactoryLocal.getInstance().getOperator(com.esri.core.geometry.Operator.Type .Union); com.esri.core.geometry.SpatialReference sr = com.esri.core.geometry.SpatialReference .create(4326); com.esri.core.geometry.GeometryCursor outputCursor = union.execute(inputGeometries , sr, null); com.esri.core.geometry.Geometry result = outputCursor.next(); }
public static void testClipGeometries() { // RandomTest(); com.esri.core.geometry.OperatorFactoryLocal engine = com.esri.core.geometry.OperatorFactoryLocal .getInstance(); com.esri.core.geometry.OperatorClip clipOp = (com.esri.core.geometry.OperatorClip )engine.getOperator(com.esri.core.geometry.Operator.Type.Clip); com.esri.core.geometry.Polygon polygon = makePolygon(); com.esri.core.geometry.SimpleGeometryCursor polygonCurs = new com.esri.core.geometry.SimpleGeometryCursor (polygon); com.esri.core.geometry.Polyline polyline = makePolyline(); com.esri.core.geometry.SimpleGeometryCursor polylineCurs = new com.esri.core.geometry.SimpleGeometryCursor (polyline); com.esri.core.geometry.MultiPoint multipoint = makeMultiPoint(); com.esri.core.geometry.SimpleGeometryCursor multipointCurs = new com.esri.core.geometry.SimpleGeometryCursor (multipoint); com.esri.core.geometry.Point point = makePoint(); com.esri.core.geometry.SimpleGeometryCursor pointCurs = new com.esri.core.geometry.SimpleGeometryCursor (point); com.esri.core.geometry.SpatialReference spatialRef = com.esri.core.geometry.SpatialReference .create(3857); com.esri.core.geometry.Envelope2D envelope = new com.esri.core.geometry.Envelope2D (); envelope.xmin = 0; envelope.xmax = 20; envelope.ymin = 5; envelope.ymax = 15; // Cursor implementation com.esri.core.geometry.GeometryCursor clipPolygonCurs = clipOp.execute(polygonCurs , envelope, spatialRef, null); com.esri.core.geometry.Polygon clippedPolygon = (com.esri.core.geometry.Polygon)clipPolygonCurs .next(); double area = clippedPolygon.calculateArea2D(); NUnit.Framework.Assert.IsTrue(System.Math.abs(area - 25) < 0.00001); // Single Geometry implementation clippedPolygon = (com.esri.core.geometry.Polygon)clipOp.execute(polygon, envelope , spatialRef, null); area = clippedPolygon.calculateArea2D(); NUnit.Framework.Assert.IsTrue(System.Math.abs(area - 25) < 0.00001); // Cursor implementation com.esri.core.geometry.GeometryCursor clipPolylineCurs = clipOp.execute(polylineCurs , envelope, spatialRef, null); com.esri.core.geometry.Polyline clippedPolyline = (com.esri.core.geometry.Polyline )clipPolylineCurs.next(); double length = clippedPolyline.calculateLength2D(); NUnit.Framework.Assert.IsTrue(System.Math.abs(length - 10 * System.Math.sqrt(2.0) ) < 1e-10); // Single Geometry implementation clippedPolyline = (com.esri.core.geometry.Polyline)clipOp.execute(polyline, envelope , spatialRef, null); length = clippedPolyline.calculateLength2D(); NUnit.Framework.Assert.IsTrue(System.Math.abs(length - 10 * System.Math.sqrt(2.0) ) < 1e-10); // Cursor implementation com.esri.core.geometry.GeometryCursor clipMulti_pointCurs = clipOp.execute(multipointCurs , envelope, spatialRef, null); com.esri.core.geometry.MultiPoint clipped_multi_point = (com.esri.core.geometry.MultiPoint )clipMulti_pointCurs.next(); int pointCount = clipped_multi_point.getPointCount(); NUnit.Framework.Assert.IsTrue(pointCount == 2); // Cursor implementation com.esri.core.geometry.GeometryCursor clipPointCurs = clipOp.execute(pointCurs, envelope , spatialRef, null); com.esri.core.geometry.Point clippedPoint = (com.esri.core.geometry.Point)clipPointCurs .next(); NUnit.Framework.Assert.IsTrue(clippedPoint != null); // RandomTest(); com.esri.core.geometry.Polyline _poly = new com.esri.core.geometry.Polyline(); _poly.startPath(2, 2); _poly.lineTo(0, 0); com.esri.core.geometry.Envelope2D _env = new com.esri.core.geometry.Envelope2D(); _env.setCoords(2, 1, 5, 3); com.esri.core.geometry.Polyline _clippedPolyline = (com.esri.core.geometry.Polyline )clipOp.execute(_poly, _env, spatialRef, null); NUnit.Framework.Assert.IsTrue(_clippedPolyline.isEmpty()); { com.esri.core.geometry.Polygon poly = new com.esri.core.geometry.Polygon(); poly.addEnvelope(new com.esri.core.geometry.Envelope2D(0, 0, 100, 100), false); poly.addEnvelope(new com.esri.core.geometry.Envelope2D(5, 5, 95, 95), true); com.esri.core.geometry.Polygon clippedPoly = (com.esri.core.geometry.Polygon)clipOp .execute(poly, new com.esri.core.geometry.Envelope2D(-10, -10, 110, 50), spatialRef , null); NUnit.Framework.Assert.IsTrue(clippedPoly.getPathCount() == 1); NUnit.Framework.Assert.IsTrue(clippedPoly.getPointCount() == 8); } }
public static void TestClipGeometries() { // RandomTest(); com.esri.core.geometry.OperatorFactoryLocal engine = com.esri.core.geometry.OperatorFactoryLocal.GetInstance(); com.esri.core.geometry.OperatorClip clipOp = (com.esri.core.geometry.OperatorClip)engine.GetOperator(com.esri.core.geometry.Operator.Type.Clip); com.esri.core.geometry.Polygon polygon = MakePolygon(); com.esri.core.geometry.SimpleGeometryCursor polygonCurs = new com.esri.core.geometry.SimpleGeometryCursor(polygon); com.esri.core.geometry.Polyline polyline = MakePolyline(); com.esri.core.geometry.SimpleGeometryCursor polylineCurs = new com.esri.core.geometry.SimpleGeometryCursor(polyline); com.esri.core.geometry.MultiPoint multipoint = MakeMultiPoint(); com.esri.core.geometry.SimpleGeometryCursor multipointCurs = new com.esri.core.geometry.SimpleGeometryCursor(multipoint); com.esri.core.geometry.Point point = MakePoint(); com.esri.core.geometry.SimpleGeometryCursor pointCurs = new com.esri.core.geometry.SimpleGeometryCursor(point); com.esri.core.geometry.SpatialReference spatialRef = com.esri.core.geometry.SpatialReference.Create(3857); com.esri.core.geometry.Envelope2D envelope = new com.esri.core.geometry.Envelope2D(); envelope.xmin = 0; envelope.xmax = 20; envelope.ymin = 5; envelope.ymax = 15; // Cursor implementation com.esri.core.geometry.GeometryCursor clipPolygonCurs = clipOp.Execute(polygonCurs, envelope, spatialRef, null); com.esri.core.geometry.Polygon clippedPolygon = (com.esri.core.geometry.Polygon)clipPolygonCurs.Next(); double area = clippedPolygon.CalculateArea2D(); NUnit.Framework.Assert.IsTrue(System.Math.Abs(area - 25) < 0.00001); // Single Geometry implementation clippedPolygon = (com.esri.core.geometry.Polygon)clipOp.Execute(polygon, envelope, spatialRef, null); area = clippedPolygon.CalculateArea2D(); NUnit.Framework.Assert.IsTrue(System.Math.Abs(area - 25) < 0.00001); // Cursor implementation com.esri.core.geometry.GeometryCursor clipPolylineCurs = clipOp.Execute(polylineCurs, envelope, spatialRef, null); com.esri.core.geometry.Polyline clippedPolyline = (com.esri.core.geometry.Polyline)clipPolylineCurs.Next(); double length = clippedPolyline.CalculateLength2D(); NUnit.Framework.Assert.IsTrue(System.Math.Abs(length - 10 * System.Math.Sqrt(2.0)) < 1e-10); // Single Geometry implementation clippedPolyline = (com.esri.core.geometry.Polyline)clipOp.Execute(polyline, envelope, spatialRef, null); length = clippedPolyline.CalculateLength2D(); NUnit.Framework.Assert.IsTrue(System.Math.Abs(length - 10 * System.Math.Sqrt(2.0)) < 1e-10); // Cursor implementation com.esri.core.geometry.GeometryCursor clipMulti_pointCurs = clipOp.Execute(multipointCurs, envelope, spatialRef, null); com.esri.core.geometry.MultiPoint clipped_multi_point = (com.esri.core.geometry.MultiPoint)clipMulti_pointCurs.Next(); int pointCount = clipped_multi_point.GetPointCount(); NUnit.Framework.Assert.IsTrue(pointCount == 2); // Cursor implementation com.esri.core.geometry.GeometryCursor clipPointCurs = clipOp.Execute(pointCurs, envelope, spatialRef, null); com.esri.core.geometry.Point clippedPoint = (com.esri.core.geometry.Point)clipPointCurs.Next(); NUnit.Framework.Assert.IsTrue(clippedPoint != null); // RandomTest(); com.esri.core.geometry.Polyline _poly = new com.esri.core.geometry.Polyline(); _poly.StartPath(2, 2); _poly.LineTo(0, 0); com.esri.core.geometry.Envelope2D _env = new com.esri.core.geometry.Envelope2D(); _env.SetCoords(2, 1, 5, 3); com.esri.core.geometry.Polyline _clippedPolyline = (com.esri.core.geometry.Polyline)clipOp.Execute(_poly, _env, spatialRef, null); NUnit.Framework.Assert.IsTrue(_clippedPolyline.IsEmpty()); { com.esri.core.geometry.Polygon poly = new com.esri.core.geometry.Polygon(); poly.AddEnvelope(new com.esri.core.geometry.Envelope2D(0, 0, 100, 100), false); poly.AddEnvelope(new com.esri.core.geometry.Envelope2D(5, 5, 95, 95), true); com.esri.core.geometry.Polygon clippedPoly = (com.esri.core.geometry.Polygon)clipOp.Execute(poly, new com.esri.core.geometry.Envelope2D(-10, -10, 110, 50), spatialRef, null); NUnit.Framework.Assert.IsTrue(clippedPoly.GetPathCount() == 1); NUnit.Framework.Assert.IsTrue(clippedPoly.GetPointCount() == 8); } }
public static void TestGetXCorrectCR185697() { com.esri.core.geometry.OperatorFactoryLocal engine = com.esri.core.geometry.OperatorFactoryLocal.GetInstance(); com.esri.core.geometry.OperatorClip clipOp = (com.esri.core.geometry.OperatorClip)engine.GetOperator(com.esri.core.geometry.Operator.Type.Clip); com.esri.core.geometry.Polyline polylineCR = MakePolylineCR(); com.esri.core.geometry.SimpleGeometryCursor polylineCursCR = new com.esri.core.geometry.SimpleGeometryCursor(polylineCR); com.esri.core.geometry.SpatialReference gcsWGS84 = com.esri.core.geometry.SpatialReference.Create(4326); com.esri.core.geometry.Envelope2D envelopeCR = new com.esri.core.geometry.Envelope2D(); envelopeCR.xmin = -180; envelopeCR.xmax = 180; envelopeCR.ymin = -90; envelopeCR.ymax = 90; // CR com.esri.core.geometry.Polyline clippedPolylineCR = (com.esri.core.geometry.Polyline)clipOp.Execute(polylineCR, envelopeCR, gcsWGS84, null); com.esri.core.geometry.Point pointResult = new com.esri.core.geometry.Point(); clippedPolylineCR.GetPointByVal(0, pointResult); NUnit.Framework.Assert.IsTrue(pointResult.GetX() == -180); clippedPolylineCR.GetPointByVal(1, pointResult); NUnit.Framework.Assert.IsTrue(pointResult.GetX() == -90); clippedPolylineCR.GetPointByVal(2, pointResult); NUnit.Framework.Assert.IsTrue(pointResult.GetX() == 0); clippedPolylineCR.GetPointByVal(3, pointResult); NUnit.Framework.Assert.IsTrue(pointResult.GetX() == 100); clippedPolylineCR.GetPointByVal(4, pointResult); NUnit.Framework.Assert.IsTrue(pointResult.GetX() == 170); clippedPolylineCR.GetPointByVal(5, pointResult); NUnit.Framework.Assert.IsTrue(pointResult.GetX() == 180); }
public static void TestMergeCursor() { com.esri.core.geometry.OperatorConvexHull bounding = (com.esri.core.geometry.OperatorConvexHull)com.esri.core.geometry.OperatorFactoryLocal.GetInstance().GetOperator(com.esri.core.geometry.Operator.Type.ConvexHull); com.esri.core.geometry.Polygon geom1 = new com.esri.core.geometry.Polygon(); com.esri.core.geometry.Polygon geom2 = new com.esri.core.geometry.Polygon(); com.esri.core.geometry.Point geom3 = new com.esri.core.geometry.Point(); com.esri.core.geometry.Line geom4 = new com.esri.core.geometry.Line(); com.esri.core.geometry.Envelope geom5 = new com.esri.core.geometry.Envelope(); com.esri.core.geometry.MultiPoint geom6 = new com.esri.core.geometry.MultiPoint(); // polygon geom1.StartPath(0, 0); geom1.LineTo(0, 0); geom1.LineTo(5, 11); geom1.LineTo(5, 11); geom1.LineTo(10, 0); geom1.LineTo(10, 0); // polygon geom2.StartPath(0, 5); geom2.LineTo(0, 5); geom2.LineTo(10, 5); geom2.LineTo(10, 5); geom2.LineTo(5, -5); geom2.LineTo(5, -5); // point geom3.SetXY(15, 1.25); // segment geom4.SetEndXY(-5, 1.25); geom4.SetStartXY(0, 0); // envelope geom5.SetCoords(0, 0, 5, 10); // multi_point geom6.Add(10, 5); geom6.Add(10, 10); // create cursor com.esri.core.geometry.Geometry[] geoms = new com.esri.core.geometry.Geometry[6]; geoms[0] = geom1; geoms[1] = geom2; geoms[2] = geom3; geoms[3] = geom4; geoms[4] = geom5; geoms[5] = geom6; com.esri.core.geometry.GeometryCursor cursor = new com.esri.core.geometry.SimpleGeometryCursor(geoms); // create convex hull from the cursor with b_merge set to true com.esri.core.geometry.GeometryCursor convex_hull_curs = bounding.Execute(cursor, true, null); com.esri.core.geometry.Polygon convex_hull = (com.esri.core.geometry.Polygon)(convex_hull_curs.Next()); NUnit.Framework.Assert.IsTrue(convex_hull_curs.Next() == null); NUnit.Framework.Assert.IsTrue(bounding.IsConvex(convex_hull, null)); com.esri.core.geometry.Point2D p1 = convex_hull.GetXY(0); com.esri.core.geometry.Point2D p2 = convex_hull.GetXY(1); com.esri.core.geometry.Point2D p3 = convex_hull.GetXY(2); com.esri.core.geometry.Point2D p4 = convex_hull.GetXY(3); com.esri.core.geometry.Point2D p5 = convex_hull.GetXY(4); com.esri.core.geometry.Point2D p6 = convex_hull.GetXY(5); NUnit.Framework.Assert.IsTrue(p1.x == 5.0 && p1.y == 11.0); NUnit.Framework.Assert.IsTrue(p2.x == 10.0 && p2.y == 10); NUnit.Framework.Assert.IsTrue(p3.x == 15.0 && p3.y == 1.25); NUnit.Framework.Assert.IsTrue(p4.x == 5.0 && p4.y == -5.0); NUnit.Framework.Assert.IsTrue(p5.x == -5.0 && p5.y == 1.25); NUnit.Framework.Assert.IsTrue(p6.x == 0.0 && p6.y == 10.0); // Test GeometryEngine com.esri.core.geometry.Geometry[] merged_hull = com.esri.core.geometry.GeometryEngine.ConvexHull(geoms, true); convex_hull = (com.esri.core.geometry.Polygon)merged_hull[0]; p1 = convex_hull.GetXY(0); p2 = convex_hull.GetXY(1); p3 = convex_hull.GetXY(2); p4 = convex_hull.GetXY(3); p5 = convex_hull.GetXY(4); p6 = convex_hull.GetXY(5); NUnit.Framework.Assert.IsTrue(p1.x == 5.0 && p1.y == 11.0); NUnit.Framework.Assert.IsTrue(p2.x == 10.0 && p2.y == 10); NUnit.Framework.Assert.IsTrue(p3.x == 15.0 && p3.y == 1.25); NUnit.Framework.Assert.IsTrue(p4.x == 5.0 && p4.y == -5.0); NUnit.Framework.Assert.IsTrue(p5.x == -5.0 && p5.y == 1.25); NUnit.Framework.Assert.IsTrue(p6.x == 0.0 && p6.y == 10.0); }