Example #1
0
        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);
        }
Example #2
0
        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);
        }
Example #3
0
        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);
        }