예제 #1
0
        public void IsAtLeast_When_Argument_Is_Less_Than_Min_Should_Throw_ArgumentException()
        {
            const int MIN_VALUE = 1;

            var ex = Assert.Throws <ArgumentException>(() => Invariant.IsAtLeast(0, MIN_VALUE, PARAMETER_NAME));

            Assert.AreEqual($"Argument '{PARAMETER_NAME}' must not be less than {MIN_VALUE}.", ex.Message);
        }
예제 #2
0
 public void IsAtLeast_When_Argument_Exceeds_Min_Should_Not_Throw()
 {
     Assert.DoesNotThrow(() => Invariant.IsAtLeast(1, 0, PARAMETER_NAME));
 }
예제 #3
0
 public void IsAtLeast_When_Argument_Is_Equal_To_Min_Should_Not_Throw()
 {
     Assert.DoesNotThrow(() => Invariant.IsAtLeast(0, 0, PARAMETER_NAME));
 }