Exemple #1
0
 public void IsApproximately_Upper_Limit_Should_Not_Throw()
 {
     ShouldNotThrow(
         () => Ensure.Comparable.IsApproximately(7, 5, 2, paramName: ParamName),
         () => EnsureArg.IsApproximately(7, 5, 2, paramName: ParamName),
         () => Ensure.That(7, ParamName).IsApproximately(5, 2)
         );
 }
Exemple #2
0
 public void IsApproximately_Too_Lower_Should_Throw()
 {
     ShouldThrow <ArgumentException>(string.Format(ExceptionMessages.Numbers_IsApproximately_Failed, 1, 2, 5),
                                     () => Ensure.Comparable.IsApproximately(1, 5, 2, paramName: ParamName),
                                     () => EnsureArg.IsApproximately(1, 5, 2, paramName: ParamName),
                                     () => Ensure.That(1, ParamName).IsApproximately(5, 2)
                                     );
 }
Exemple #3
0
 public void IsApproximately_Lower_Should_Not_Throw()
 {
     ShouldNotThrow(
         () => Ensure.Comparable.IsApproximately(4, 5, 2, paramName: ParamName),
         () => EnsureArg.IsApproximately(4, 5, 2, paramName: ParamName),
         () => Ensure.That(4, ParamName).IsApproximately(5, 2)
         );
 }