コード例 #1
0
        public void IsBetween_OutOfRangeValue_ArgumentOutOfRangeException(
            [Values(-10, -11, int.MinValue, 10, 11, int.MaxValue)] int value)
        {
            var ex = Assert.Throws <ArgumentOutOfRangeException>(
                () => ParameterValidation.IsBetween(value, -10, 10, TestParameterName));

            Assert.That(ex.ParamName, Is.EqualTo(TestParameterName));
        }
コード例 #2
0
 public void IsBetween_InRangeValue_DoesNotThrow(
     [Values(-9, -8, 8, 9)] int value)
 {
     Assert.DoesNotThrow(
         () => ParameterValidation.IsBetween(value, -10, 10, TestParameterName));
 }