コード例 #1
0
 public void TwentyFor4X5RectangleFromSquare()
 {
     //This should past... It looks like a duck
     Rectangle newRectangle = new Square();
     newRectangle.Width = 4;
     newRectangle.Height = 5;
     Assert.AreEqual(20, AreaCalculator.CalculateArea(newRectangle));
 }
コード例 #2
0
 public void NineFor3X3Square()
 {
     var mySquare = new Square() { Height = 3 };
     Assert.AreEqual(9, AreaCalculator.CalculateArea(mySquare));
 }