コード例 #1
0
        public void SquareTest()
        {
            int area      = 25;
            int perimeter = 20;

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

            area      = 225;
            perimeter = 60;

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

            area      = 49;
            perimeter = 28;

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

            area      = 121;
            perimeter = 44;

            Assert.AreEqual(area, SQ4.GetArea());
            Assert.AreEqual(perimeter, SQ4.GetPerimeter());
        }
コード例 #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());
        }