示例#1
0
        public void IsSquare()
        {
            //arrange
            Program3.Rectangle rec = new Program3.Rectangle(new Program3.Point(0, 0), new Program3.Point(0, 1), new Program3.Point(1, 1), new Program3.Point(1, 0));
            //act
            bool expected = true;
            bool actual   = rec.IsASquare();

            //assert
            Assert.AreEqual(expected, actual);
        }
示例#2
0
        public void DictanceInSquare()
        {
            //arrange
            Program3.Rectangle rec = new Program3.Rectangle(new Program3.Point(0, 0), new Program3.Point(0, 0), new Program3.Point(2, 0), new Program3.Point(2, 0));
            //act
            double expected = 8;
            double actual   = rec.Perimeter();

            //Assert
            Assert.AreEqual(expected, actual);
        }