public void Path() { SvgCanvas canvas = new SvgCanvas("test", "2in", "2in"); using (var path = canvas.CreatePath()) { path.MoveTo(2500, 5000); path.LineTo(5000, 4000); path.LineTo(7500, 5000); path.Arc(2500, 2500, 5000, true, false); path.Close(); canvas.Path(path, 0, true, "red"); } var s = canvas.ToSvg(); var document = XDocument.Parse(s); document.Root.Should().HaveElement(Name("path")) .Which .Should() .BeOfType <XElement>() .And.HaveAttribute("d", "M2500,5000 L5000,4000 L7500,5000A2500,2500 0 1,0 2500,5000 z") .And.HaveAttribute("stroke", "none") .And.HaveAttribute("fill", "red") .And.Match(xe => xe.Parent.Name == Name("svg")); }