Esempio n. 1
0
        public void Calcular_area_de_un_cuadrado()
        {
            AreaCalculator areaCalculator = new AreaCalculator();
            Square shape = new Square(2);

            decimal expected = 4;

            decimal result = areaCalculator.Calculate(shape);

            Assert.AreEqual(expected, result, "El area deberia ser 4");
        }
Esempio n. 2
0
 public decimal Calculate(Square shape)
 {
     return shape.Size*shape.Size;
 }