Exemplo n.º 1
0
        public void NineFor3x3Squre()
        {
            var squre = new Squre {
                Height = 3
            };

            Assert.AreEqual(9, AreaCalculator.CalculateArea(squre));
        }
Exemplo n.º 2
0
        public void TwentyFor4x5Squre()
        {
            //Failed means not substitutable
            var rectangle = new Squre();

            rectangle.Height = 4;
            rectangle.Width  = 5;
            Assert.AreEqual(20, AreaCalculator.CalculateArea(rectangle));
        }
Exemplo n.º 3
0
 public static int CalculateArea(Squre squre)
 {
     return(squre.Height * squre.Width);
 }