예제 #1
0
 public void IsPostive_Zero_IsNegative_Should_Throw()
 {
     ShouldThrow <ArgumentException>(string.Format(ExceptionMessages.Numbers_IsPositive_Failed, 0),
                                     () => Ensure.Comparable.IsPositive(0, ZeroSignMode.IsNegative, paramName: ParamName),
                                     () => EnsureArg.IsPositive(0, ZeroSignMode.IsNegative, paramName: ParamName),
                                     () => Ensure.That(0, ParamName).IsPositive(ZeroSignMode.IsNegative)
                                     );
 }
예제 #2
0
 public void IsPositive_Not_Zero_Should_Throw()
 {
     ShouldThrow <ArgumentException>(string.Format(ExceptionMessages.Numbers_IsPositive_Failed, -1),
                                     () => Ensure.Comparable.IsPositive(-1, paramName: ParamName),
                                     () => EnsureArg.IsPositive(-1, paramName: ParamName),
                                     () => Ensure.That(-1, ParamName).IsPositive()
                                     );
 }
예제 #3
0
 public void IsPostive_Zero_IsBoth_Should_Not_Throw()
 {
     ShouldNotThrow(
         () => Ensure.Comparable.IsPositive(0, ZeroSignMode.IsBoth, paramName: ParamName),
         () => EnsureArg.IsPositive(0, ZeroSignMode.IsBoth, paramName: ParamName),
         () => Ensure.That(0, ParamName).IsPositive(ZeroSignMode.IsBoth)
         );
 }
예제 #4
0
 public void IsPositive_Not_Zero_Should_Not_Throw()
 {
     ShouldNotThrow(
         () => Ensure.Comparable.IsPositive(1, paramName: ParamName),
         () => EnsureArg.IsPositive(1, paramName: ParamName),
         () => Ensure.That(1, ParamName).IsPositive()
         );
 }