Beispiel #1
0
        public void Constructor_FromPoints_ExceptionOnBeginTwice()
        {
            // Arrange
            var curve = new FillCurve <FillSegment>();

            curve.BeginCurve(new Vector2d(0, 0));

            // Act & Assert
            Assert.ThrowsException <MethodAccessException>(() =>
            {
                curve.BeginCurve(new Vector2d(1, 0));
            });
        }
Beispiel #2
0
        public void Constructor_FromPoints()
        {
            // Arrange
            var curve = new FillCurve <FillSegment>();

            // Act
            curve.BeginCurve(new Vector2d(0, 0));
            curve.AddToCurve(new Vector3d(1, 0, 0));
            curve.AddToCurve(new Vector2d(1, 2), new FillSegment(true));

            // Assert
            Assert.AreEqual(2, curve.Elements.Count);
            Assert.IsTrue(curve.Elements[1].Edge.IsConnector);
        }