コード例 #1
0
        public void Circle_NotFilled()
        {
            SvgCanvas canvas = new SvgCanvas("test", "2in", "2in");

            canvas.Circle(1, 2, 3, 4, false, "red");
            var s        = canvas.ToSvg();
            var document = XDocument.Parse(s);

            document.Root.Should().HaveElement(Name("circle"))
            .Which
            .Should()
            .BeOfType <XElement>()
            .And.HaveAttribute("cx", "1")
            .And.HaveAttribute("cy", "2")
            .And.HaveAttribute("r", "3")
            .And.HaveAttribute("stroke", "red")
            .And.HaveAttribute("stroke-width", "4")
            .And.HaveAttribute("fill", "none")
            .And.Match(xe => xe.Parent.Name == Name("svg"));
        }