public void TestPolyBezierSegmentConstructor(string points, int count) { var pointCollection = (PointCollection)_pointCollectionConverter.ConvertFromInvariantString(points); var polyBezierSegment = new PolyBezierSegment(pointCollection); Assert.IsNotNull(polyBezierSegment); Assert.AreEqual(count, polyBezierSegment.Points.Count); }
public void ConvertStringToPointCollectionTest() { PointCollection result = _pointCollectionConverter.ConvertFromInvariantString("0 48, 0 144, 96 150, 100 0, 192 0, 192 96, 50 96, 48 192, 150 200 144 48") as PointCollection; Assert.IsNotNull(result); Assert.AreEqual(10, result.Count); }
public void CreatePolygonFromStringPointCollectionTest() { PointCollection points = _pointCollectionConverter.ConvertFromInvariantString("0 48, 0 144, 96 150, 100 0, 192 0, 192 96, 50 96, 48 192, 150 200 144 48") as PointCollection; Polygon polygon = new Polygon { Points = points }; Assert.IsNotNull(points); Assert.IsNotNull(polygon); Assert.AreEqual(10, points.Count); }