public void Execute_When_correct_request_Then_validates_Then_calls_execute()
        {
            var request = ProductCreateRequestBuilder.Create()
                          .WithProduct(ProductDtoBuilder.Create()
                                       .WithName("TEST")
                                       .WithCategoryId(1)
                                       .WithDescription("TEST DESCRIPTION")
                                       .WithOption(ProductOptionDtoBuilder.Create()
                                                   .WithIndex(1)
                                                   .WithName("TEST")
                                                   .Build())
                                       .WithVariant(ProductVariantDtoBuilder.Create()
                                                    .WithPrice(10)
                                                    .WithQuantity(10)
                                                    .WithOptionValue(ProductVariantOptionValueDtoBuilder.Create()
                                                                     .WithIndex(1)
                                                                     .WithValue("TEST")
                                                                     .Build())
                                                    .Build())
                                       .Build())
                          .Build();

            SetupMocks(request);

            CommandMock.Setup(c => c.ValidateRequestCustom());

            CommandMock.Object.Execute(request);

            CommandMock.Protected().Verify("ValidateRequest", Times.Once());
            CommandMock.Verify(c => c.ValidateRequestCustom(), Times.Once);
        }
        public void ValidateRequestCustom_When_newIds_Then_success_validation()
        {
            ProductCreateRequest request = ProductCreateRequestBuilder.Create()
                                           .WithProduct(ProductDtoBuilder.Create()
                                                        .WithName("TEST")
                                                        .WithCategoryId(1)
                                                        .WithDescription("TEST DESCRIPTION")
                                                        .WithOption(ProductOptionDtoBuilder.Create()
                                                                    .WithIndex(1)
                                                                    .WithName("TEST")
                                                                    .Build())
                                                        .WithVariant(ProductVariantDtoBuilder.Create()
                                                                     .WithPrice(10)
                                                                     .WithQuantity(10)
                                                                     .WithOptionValue(ProductVariantOptionValueDtoBuilder.Create()
                                                                                      .WithIndex(1)
                                                                                      .WithValue("TEST")
                                                                                      .Build())
                                                                     .Build())
                                                        .Build())
                                           .Build();

            SetupMocks(request);

            CommandMock.Object.ValidateRequestCustom();

            ValidatorMock.Verify(s => s.ValidateNewIds(It.IsAny <IDbContext>(),
                                                       It.IsAny <ProductCreateRequest>(),
                                                       It.IsAny <ArgumentErrorsCollection>()),
                                 Times.Once);
        }