コード例 #1
0
 public PutProductService(
     IDefaultDbContext context,
     ProductValidator entityValidator,
     PutProductSpecificationsValidator domainValidator
     ) : base(entityValidator, domainValidator)
 {
     Context = context;
 }
コード例 #2
0
        private PutProductService GetMockedPutProductService()
        {
            var mockedDbContext = MockDefaultHelper
                                  .GetMockedDbContext()
                                  .AddMockedProducts();

            var mockedDbContextQuery = MockDefaultHelper
                                       .GetMockedDbContext()
                                       .AddMockedProducts();

            var mockedProductValidator = new ProductValidator();

            var mockedPutProductSpecificationsValidator = new PutProductSpecificationsValidator();

            var mockedPutProductService = new PutProductService(
                mockedDbContext.Object,
                mockedProductValidator,
                mockedPutProductSpecificationsValidator);

            return(mockedPutProductService);
        }