public void WhenGrantTypeIsNull_ThenThrows() { dto.GrantType = null; Assert.Throws <ValidationException>( FluentValidation <CreateAccessToken> .NotNullErrorMessage(x => x.GrantType), () => validator.ValidateAndThrow(dto)); }
public void WhenNameIsNull_ThenThrows() { var dto = new CreateClientApplication { Name = null, }; Assert.Throws <ValidationException>( FluentValidation <CreateClientApplication> .NotNullErrorMessage(x => x.Name), () => validator.ValidateAndThrow(dto)); }