コード例 #1
0
 public void ExceptionIfZeroTriangleSide()
 {
     var calculator = new RightTriangleAreaCalculator();
     calculator.Calculate(150, 10, 0);
 }
コード例 #2
0
 public void ExceptionIfNegativeTriangleSide()
 {
     var calculator = new RightTriangleAreaCalculator();
     calculator.Calculate(-1, -1, 23);
 }
コード例 #3
0
 public void ExceptionIfTriangleIsNotRight()
 {
     var calculator = new RightTriangleAreaCalculator();
     calculator.Calculate(150, 10, 10);
 }
コード例 #4
0
 public void CalculateAreaTest()
 {
     var calculator = new RightTriangleAreaCalculator();
     var result = calculator.Calculate(1, 1, 2);
     Assert.AreEqual(result, 1);
 }