public void WhenIdBlank_ThenThrows() { dto.Id = string.Empty; Assert.Throws <ValidationException>(FluentValidation <UpdateUserAccount> .NotEmptyErrorMessage(x => x.Id), () => validator.ValidateAndThrow(dto)); }
public void WhenIdIsNull_ThenThrows() { var dto = new GetUserAccount { Id = null, }; Assert.Throws <ValidationException>(FluentValidation <GetUserAccount> .NotEmptyErrorMessage(x => x.Id), () => validator.ValidateAndThrow(dto)); }
public void WhenIdIsNull_ThenThrows() { var dto = new DeleteClientApplication { Id = null, }; Assert.Throws <ValidationException>( FluentValidation <DeleteClientApplication> .NotEmptyErrorMessage(x => x.Id), () => validator.ValidateAndThrow(dto)); }