Пример #1
0
        public void ShouldBeInvalidWhenSpecifiedEmptyOrOtherRoles()
        {
            var validator = new ValidRole();

            Assert.IsFalse(validator.IsValid(" "));
            Assert.IsFalse(validator.IsValid("Select Role"));
        }
Пример #2
0
        public void ShouldBeValidForAdminAndAuthor()
        {
            var validator = new ValidRole();

            Assert.IsTrue(validator.IsValid(Roles.Admin));
            Assert.IsTrue(validator.IsValid(Roles.Author));
        }
Пример #3
0
 public void ShouldBeValidForAdminAndAuthor()
 {
     var validator = new ValidRole();
     Assert.IsTrue(validator.IsValid(Roles.Admin));
     Assert.IsTrue(validator.IsValid(Roles.Author));
 }
Пример #4
0
 public void ShouldBeInvalidWhenSpecifiedEmptyOrOtherRoles()
 {
     var validator = new ValidRole();
     Assert.IsFalse(validator.IsValid(" "));
     Assert.IsFalse(validator.IsValid("Select Role"));
 }