public void AreaPropertyRectangleTest(double length, double width, double expectedArea) { //Arrange BaseRectangleShape rectangle = new BaseRectangleShape(length, width); //Act var actualArea = rectangle.Area; //Assert Assert.AreEqual(expectedArea, actualArea); }
public void PerimeterPropertyRectangleTest(double length, double width, double expectedPerimeter) { //Arrange BaseRectangleShape rectangle = new BaseRectangleShape(length, width); //Act var actualPerimeter = rectangle.Perimeter; //Assert Assert.AreEqual(expectedPerimeter, actualPerimeter); }
public void EqualsRectangleMethodTest(double length, double width, bool expected) { //Arrange BaseRectangleShape actualRectangle = new BaseRectangleShape(length, width); BaseRectangleShape expectedRectangle = new BaseRectangleShape(length, width); //Act var actual = actualRectangle.Equals(expectedRectangle); //Assert Assert.AreEqual(expected, actual); }
/// <summary> /// Constructor to cut shape from another. /// </summary> /// <param name="currentShape">Shape's blank.</param> /// <param name="cuttingShape">Shape which Cut out.</param> public FilmRectangle(BaseRectangleShape currentShape, BaseRectangleShape cuttingShape) : base(currentShape, cuttingShape) { }