示例#1
0
        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);
        }
示例#2
0
        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);
        }
示例#3
0
        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);
        }
示例#4
0
 /// <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)
 {
 }