public void CheckTriangle(float sideA, float sideB, float sideC, float expectArea, float expectPerim) { Triangle triangle = new TrianglePaper(sideA, sideB, sideC); Assert.AreEqual(expectArea, triangle.GetArea(), 0.00001f); Assert.AreEqual(expectPerim, triangle.GetPerimeter(), 0.00001f); }
public void TestGetArea() { var sidesList = new List <double> { 3, 2, 3 }; var rectangle = new TrianglePaper(sidesList, Color.Red); double result = rectangle.GetArea(); double actualResult = 2.828; Assert.AreEqual(result, actualResult, 0.001); }