public void DrawLinesCloseAllFigures()
        {
            var builder = new ShapeBuilder();

            builder.AddLine(10, 10, 10, 90);
            builder.AddLine(10, 90, 50, 50);
            builder.StartFigure();
            builder.AddLine(10, 10, 10, 90);
            builder.AddLine(10, 90, 50, 50);
            var shape = builder.Build();

            Assert.Equal(2, shape.Paths.Length);
            Assert.IsType <Path>(shape.Paths[0]);
            Assert.IsType <Path>(shape.Paths[1]);

            builder.CloseAllFigures();
            shape = builder.Build();

            Assert.Equal(2, shape.Paths.Length);
            Assert.IsType <Polygon>(shape.Paths[0].AsShape());
            Assert.IsType <Polygon>(shape.Paths[1].AsShape());
        }