public static void Factory_with_CircumRadius_Creates_Shape(int numberOfSides, double circumRadius) { RegularPolygon regularPolygon = RegularPolygon.RegularPolygonByCircumradius(numberOfSides, circumRadius); Assert.AreEqual(numberOfSides, regularPolygon.Points.Count); Assert.AreEqual(numberOfSides, regularPolygon.Angles.Count); Assert.AreEqual(numberOfSides, regularPolygon.Sides.Count); Assert.AreEqual(GeometryLibrary.ZeroTolerance, regularPolygon.Tolerance); Assert.AreEqual(0, regularPolygon.Centroid.X, Tolerance); Assert.AreEqual(0, regularPolygon.Centroid.Y, Tolerance); Assert.AreEqual(numberOfSides, regularPolygon.NumberOfSides); Assert.AreEqual(11.75570505, regularPolygon.SideLength, Tolerance); Assert.AreEqual(circumRadius, regularPolygon.CircumRadius, Tolerance); Assert.AreEqual(0, regularPolygon.CircumCenter.X, Tolerance); Assert.AreEqual(0, regularPolygon.CircumCenter.Y, Tolerance); Assert.AreEqual(8.090169944, regularPolygon.Apothem, Tolerance); Assert.AreEqual(8.090169944, regularPolygon.InRadius, Tolerance); Assert.AreEqual(0, regularPolygon.InCenter.X, Tolerance); Assert.AreEqual(0, regularPolygon.InCenter.Y, Tolerance); Assert.AreEqual(108, regularPolygon.AngleInterior.Degrees, Tolerance); Assert.AreEqual(540, regularPolygon.AngleInteriorSum.DegreesRaw, Tolerance); }