public async Task AssertIdIsPassed() { string capturedUserNameId = null; idValidatorMock.RuleFor(m => m.UserNameId).Custom((property, context) => { capturedUserNameId = property; }); validatorMock.Include(idValidatorMock); var token = new CancellationToken(); await validationPipelineBehavior.Handle(requestMock, token, nextMock); Assert.That(userNameId, Is.EqualTo(capturedUserNameId)); }
public virtual void AddDeploymentValidationRule(AbstractValidator <DeploymentActionValidationContext> validator) { validator.Include(new AzureResourceGroupActionHandlerValidator()); }
public void AddDeploymentValidationRule(AbstractValidator <DeploymentActionValidationContext> validator) { validator.Include(new TerraformValidator(cloudTemplateHandlerFactory)); }