Exemple #1
0
        public void CanCreate_InvalidState_ReturnsFalse()
        {
            validator.ModelState.AddModelError("Test", "Test");

            Assert.False(validator.CanCreate(ObjectsFactory.CreateRoleView(role.Id + 1)));
            Assert.Single(validator.ModelState);
        }
Exemple #2
0
        public void CanCreate_CanNotCreateWithInvalidModelState()
        {
            validator.ModelState.AddModelError("Test", "Test");

            Assert.IsFalse(validator.CanCreate(ObjectFactory.CreateRoleView()));
        }