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