예제 #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);
        }
예제 #2
0
        public void CanCreate_CanNotCreateWithInvalidModelState()
        {
            validator.ModelState.AddModelError("Test", "Test");

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