public void CanEdit_InvalidState_ReturnsFalse() { validator.ModelState.AddModelError("Test", "Test"); Assert.False(validator.CanEdit(ObjectsFactory.CreateRoleView(role.Id + 1))); Assert.Single(validator.ModelState); }
public void CanEdit_CanNotEditWithInvalidModelState() { validator.ModelState.AddModelError("Test", "Test"); Assert.IsFalse(validator.CanEdit(ObjectFactory.CreateRoleView())); }