public void ArithmeticOpTests_Divide_SmallThanTolerance_ShouldThrow() { var op = new ArithmeticOp(Operator.Division); var denominator = AppConstants.Tolerance - 1e-5; Assert.Throws <DivideByZeroException>(() => op.Divide(1, denominator)); }
public void ArithmeticOpTests_Divide_BiggerThanTolerance_Pass() { var op = new ArithmeticOp(Operator.Division); var denominator = AppConstants.Tolerance + 1e-5; var result = op.Divide(1, denominator); Assert.Equal(1 / denominator, result); }