示例#1
0
 public void IsNotNegative_Zero_IsNegative_Should_Throw()
 {
     ShouldThrow <ArgumentException>(string.Format(ExceptionMessages.Numbers_IsNotNegative_Failed, 0),
                                     () => Ensure.Comparable.IsNotNegative(0, ZeroSignMode.IsNegative, paramName: ParamName),
                                     () => EnsureArg.IsNotNegative(0, ZeroSignMode.IsNegative, paramName: ParamName),
                                     () => Ensure.That(0, ParamName).IsNotNegative(ZeroSignMode.IsNegative)
                                     );
 }
示例#2
0
 public void IsNotNegativee_Not_Zero_Should_Throw()
 {
     ShouldThrow <ArgumentException>(string.Format(ExceptionMessages.Numbers_IsNotNegative_Failed, -1),
                                     () => Ensure.Comparable.IsNotNegative(-1, paramName: ParamName),
                                     () => EnsureArg.IsNotNegative(-1, paramName: ParamName),
                                     () => Ensure.That(-1, ParamName).IsNotNegative()
                                     );
 }
示例#3
0
 public void IsNotNegative_Zero_IsPositive_Should_Not_Throw()
 {
     ShouldNotThrow(
         () => Ensure.Comparable.IsNotNegative(0, ZeroSignMode.IsPositive, paramName: ParamName),
         () => EnsureArg.IsNotNegative(0, ZeroSignMode.IsPositive, paramName: ParamName),
         () => Ensure.That(0, ParamName).IsNotNegative(ZeroSignMode.IsPositive)
         );
 }
示例#4
0
 public void IsNotNegative_Not_Zero_Should_Not_Throw()
 {
     ShouldNotThrow(
         () => Ensure.Comparable.IsNotNegative(1, paramName: ParamName),
         () => EnsureArg.IsNotNegative(1, paramName: ParamName),
         () => Ensure.That(1, ParamName).IsNotNegative()
         );
 }