public virtual void TestOpenPath() { com.esri.core.geometry.Polyline poly = new com.esri.core.geometry.Polyline(); poly.StartPath(10, 1); poly.LineTo(15, 20); poly.LineTo(30, 14); poly.LineTo(60, 144); poly.ClosePathWithLine(); poly.StartPath(10, 1); poly.LineTo(15, 20); poly.LineTo(300, 14); poly.LineTo(60, 144); poly.ClosePathWithLine(); poly.StartPath(10, 1); poly.LineTo(125, 20); poly.LineTo(30, 14); poly.LineTo(600, 144); poly.ClosePathWithLine(); }
public virtual void TestCloneStuffPolyline() { com.esri.core.geometry.Polyline poly = new com.esri.core.geometry.Polyline(); poly.StartPath(10, 1); poly.LineTo(15, 20); poly.LineTo(30, 14); poly.LineTo(60, 144); poly.StartPath(10, 1); poly.LineTo(15, 20); poly.LineTo(300, 14); poly.LineTo(60, 144); poly.StartPath(10, 1); poly.LineTo(125, 20); poly.LineTo(30, 14); poly.LineTo(600, 144); poly.ClosePathWithLine(); com.esri.core.geometry.Polyline clone = (com.esri.core.geometry.Polyline)poly.Copy(); NUnit.Framework.Assert.IsTrue(clone.GetPathCount() == 3); NUnit.Framework.Assert.IsTrue(clone.GetPathStart(2) == 8); NUnit.Framework.Assert.IsTrue(!clone.IsClosedPath(0)); NUnit.Framework.Assert.IsTrue(!clone.IsClosedPath(1)); NUnit.Framework.Assert.IsTrue(clone.IsClosedPath(2)); NUnit.Framework.Assert.IsTrue(clone.GetXY(5).IsEqual(new com.esri.core.geometry.Point2D(15, 20))); }