示例#1
0
        public void RectangleTest()
        {
            int area      = 50;
            int perimeter = 30;

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

            area      = 24;
            perimeter = 20;

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

            area      = 63;
            perimeter = 32;

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

            area      = 110;
            perimeter = 42;

            Assert.AreEqual(area, REC4.GetArea());
            Assert.AreEqual(perimeter, REC4.GetPerimeter());
        }
        public void RectangleTests()
        {
            int area      = 12;
            int perimeter = 14;

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

            area      = 20;
            perimeter = 18;

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