public void TestGetAreaOfCircle(double radius, double expectedArea) { Circle paperCircle = new PaperCircle(radius); Circle membraneCircle = new MembraneCircle(radius); Assert.AreEqual(expectedArea, paperCircle.GetArea()); Assert.AreEqual(expectedArea, membraneCircle.GetArea()); }
public void TestFindTotalAreaInBox(double radius, double newRadius, int index) { Box box = new Box(); Circle firstCircle = new MembraneCircle(radius); Circle secondCircle = new PaperCircle(newRadius); Assert.AreEqual(0, box.GetTotalArea()); box.AddShape(firstCircle); box.AddShape(secondCircle); Assert.AreEqual(firstCircle.GetArea() + secondCircle.GetArea(), box.GetTotalArea()); }