예제 #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()
         );
 }