Пример #1
0
        public void ShouldValidateEmptyList()
        {
            NonEmptyListAttribute attribute = new NonEmptyListAttribute();
            bool isValid = attribute.IsValid(new List <object>());

            Assert.IsFalse(isValid);
        }
Пример #2
0
        public void ShouldValidateNonEmptyList()
        {
            NonEmptyListAttribute attribute = new NonEmptyListAttribute();
            bool isValid = attribute.IsValid(new List <object> {
                new object()
            });

            Assert.IsTrue(isValid);
        }