Пример #1
0
        public void RejectInvalidValues()
        {
            var attr = new NonNegativeIntegerAttribute();

            Assert.False(attr.IsValid(InvalidValue));
            Assert.False(attr.IsValid(-1));
            Assert.False(attr.IsValid(-99999999));
        }
Пример #2
0
        public void AcceptValidValues()
        {
            var attr = new NonNegativeIntegerAttribute();

            Assert.True(attr.IsValid(0));
            Assert.True(attr.IsValid(1));
            Assert.True(attr.IsValid(99999999));
        }