Ejemplo n.º 1
0
 public void IsNegative_Zero_IsPositive_Should_Throw()
 {
     ShouldThrow <ArgumentException>(string.Format(ExceptionMessages.Numbers_IsNegative_Failed, 0),
                                     () => Ensure.Comparable.IsNegative(0, ZeroSignMode.IsPositive, paramName: ParamName),
                                     () => EnsureArg.IsNegative(0, ZeroSignMode.IsPositive, paramName: ParamName),
                                     () => Ensure.That(0, ParamName).IsNegative(ZeroSignMode.IsPositive)
                                     );
 }
Ejemplo n.º 2
0
 public void IsNegative_Not_Zero_Should_Throw()
 {
     ShouldThrow <ArgumentException>(string.Format(ExceptionMessages.Numbers_IsNegative_Failed, 1),
                                     () => Ensure.Comparable.IsNegative(1, paramName: ParamName),
                                     () => EnsureArg.IsNegative(1, paramName: ParamName),
                                     () => Ensure.That(1, ParamName).IsNegative()
                                     );
 }
Ejemplo n.º 3
0
 public void IsNegative_Zero_IsBoth_Should_Not_Throw()
 {
     ShouldNotThrow(
         () => Ensure.Comparable.IsNegative(0, ZeroSignMode.IsBoth, paramName: ParamName),
         () => EnsureArg.IsNegative(0, ZeroSignMode.IsBoth, paramName: ParamName),
         () => Ensure.That(0, ParamName).IsNegative(ZeroSignMode.IsBoth)
         );
 }
Ejemplo n.º 4
0
 public void IsNegative_Not_Zero_Should_Not_Throw()
 {
     ShouldNotThrow(
         () => Ensure.Comparable.IsNegative(-1, paramName: ParamName),
         () => EnsureArg.IsNegative(-1, paramName: ParamName),
         () => Ensure.That(-1, ParamName).IsNegative()
         );
 }