public void SquareTests()
        {
            int area      = 16;
            int perimeter = 16;

            Assert.AreEqual(area, Sq1.GetArea());
            Assert.AreEqual(perimeter, Sq1.GetPerimeter());

            area      = 36;
            perimeter = 24;

            Assert.AreEqual(area, Sq2.GetArea());
            Assert.AreEqual(perimeter, Sq2.GetPerimeter());

            area      = 25;
            perimeter = 20;

            Assert.AreEqual(area, Sq3.GetArea());
            Assert.AreEqual(perimeter, Sq3.GetPerimeter());

            area      = 225;
            perimeter = 60;

            Assert.AreEqual(area, Sq4.GetArea());
            Assert.AreEqual(perimeter, Sq4.GetPerimeter());

            area      = 49;
            perimeter = 28;

            Assert.AreEqual(area, Sq5.GetArea());
            Assert.AreEqual(perimeter, Sq5.GetPerimeter());
        }
Example #2
0
        public void SquareTests()
        {
            int area      = 16;
            int perimeter = 16;

            Assert.AreEqual(area, Sq1.GetArea());
            Assert.AreEqual(perimeter, Sq1.GetPerimeter());

            area      = 36;
            perimeter = 24;

            Assert.AreEqual(area, Sq2.GetArea());
            Assert.AreEqual(perimeter, Sq2.GetPerimeter());
        }