public void NineFor3x3Squre() { var squre = new Squre { Height = 3 }; Assert.AreEqual(9, AreaCalculator.CalculateArea(squre)); }
public void TwentyFor4x5Squre() { //Failed means not substitutable var rectangle = new Squre(); rectangle.Height = 4; rectangle.Width = 5; Assert.AreEqual(20, AreaCalculator.CalculateArea(rectangle)); }
public static int CalculateArea(Squre squre) { return(squre.Height * squre.Width); }