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