Beispiel #1
0
        public void TestGetPerimeter()
        {
            var    circle       = new CirclePaper(7, Color.Blue);
            double result       = circle.GetPerimeter();
            double actualResult = 43.98229;

            Assert.AreEqual(result, actualResult, 0.00001);
        }
        public void CheckCircle(float radius, float expectArea, float expectPerim)
        {
            Circle rectangle = new CirclePaper(radius);

            Assert.AreEqual(expectArea, rectangle.GetArea(), 0.0001f);

            Assert.AreEqual(expectPerim, rectangle.GetPerimeter(), 0.0001f);
        }