public void IsNotNegativeOfTimeSpan_When_Argument_Is_Negative_One_Should_Throw_ArgumentException() { var ex = Assert.Throws <ArgumentException>( () => Invariant.IsNotNegative(TimeSpan.FromTicks(1).Negate(), PARAMETER_NAME)); Assert.AreEqual($"Argument '{PARAMETER_NAME}' must not have a negative value.", ex.Message); }
public void IsNotNegativeOfDecimal_When_Argument_Is_Negative_One_Should_Throw_ArgumentException() { var ex = Assert.Throws <ArgumentException>(() => Invariant.IsNotNegative((decimal) - 1, PARAMETER_NAME)); Assert.AreEqual($"Argument '{PARAMETER_NAME}' must not have a negative value.", ex.Message); }
public void IsNotNegativeOfTimeSpan_When_Argument_Is_Zero_Should_Not_Throw() { Assert.DoesNotThrow(() => Invariant.IsNotNegative(TimeSpan.Zero, PARAMETER_NAME)); }
public void IsNotNegativeOfDecimal_When_Argument_Is_Zero_Should_Not_Throw() { Assert.DoesNotThrow(() => Invariant.IsNotNegative((decimal)0, PARAMETER_NAME)); }