예제 #1
0
        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));
        }
예제 #2
0
 public virtual void AddDeploymentValidationRule(AbstractValidator <DeploymentActionValidationContext> validator)
 {
     validator.Include(new AzureResourceGroupActionHandlerValidator());
 }
예제 #3
0
 public void AddDeploymentValidationRule(AbstractValidator <DeploymentActionValidationContext> validator)
 {
     validator.Include(new TerraformValidator(cloudTemplateHandlerFactory));
 }