示例#1
0
        public void TestUnknownFigure()
        {
            IFigure unknownFigure = new UnknownFigure(0, new Dictionary <string, double> {
                { "r", 4 }
            });

            double area = unknownFigure.CalculateArea();

            Assert.AreEqual(area, 50.24, 0.1);
        }
示例#2
0
        public void CalculateArea_figure()
        {
            //arrange
            int[,] coord = { { 0, 1, 2 }, { 3, 4, 5 } };
            double result = 3;

            //act
            UnknownFigure unknownFigure = new UnknownFigure(coord);
            double        actual        = unknownFigure.CalculateArea();

            //assept
            Assert.Equal(result, actual);
        }