Пример #1
0
        public void IsValid_WhenArgumentNullAndRequiredFalse_ShouldReturnTrue()
        {
            SUT = new MinimumCountAttribute(1, false);
            var result = SUT.IsValid(null);

            Assert.AreEqual(true, result);
        }
Пример #2
0
        public void IsValid_WhenArgumentNotNullAndMinCountBiggerThanListCount_ShouldReturnFalse()
        {
            var testICollection = new List <string>()
            {
                "test1", "test2", "test3", "test4", "test5"
            };

            SUT = new MinimumCountAttribute(10);

            var result = SUT.IsValid(testICollection);

            Assert.AreEqual(false, result);
        }
Пример #3
0
        public void IsValid_WhenArgumentNullAndRequiredTrue_ShouldReturnFalse()
        {
            var result = SUT.IsValid(null);

            Assert.AreEqual(false, result);
        }