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