public void PerimeterCalculator_WithFourPoints() { double actualPerimeter = new Figure(p1, p2, p3, p4).PerimeterCalculator(); double expectedPerimeter = 16; Assert.AreEqual(expectedPerimeter, actualPerimeter, 0.01); }
public void PerimeterCalculator_WithThreePoints() { double actualPerimeter = new Figure(p1, p2, p3).PerimeterCalculator(); double expectedPerimeter = 10.47; Assert.AreEqual(expectedPerimeter, actualPerimeter, 0.01); }
static void displayInformation(Figure figure) { Console.WriteLine(String.Format("The figure is {0}. It`s perimeter is {1}", figure.GetName(), figure.PerimeterCalculator())); }