Example #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);
        }
Example #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);
        }
Example #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);
        }
Example #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)
 {
 }