예제 #1
0
        public void Startup()
        {
            _orderRepository = new TestOrderRepository();
            _catalogRepository = new TestCatalogRepository();
            _addressValidation = new TestAddressValidator();
            _shippingRepository = new TestShippingRepository();
            _shippingService = new SimpleShippingService(_shippingRepository);
            _taxRepository = new TestTaxRepository();
            _taxService = new RegionalSalesTaxService(_taxRepository);
            _orderService = new OrderService(_orderRepository,_catalogRepository,_shippingRepository,_shippingService);
            _personalizationRepository = new TestPersonalizationRepository();
            _personalizationService = new PersonalizationService(_personalizationRepository,_orderRepository, _orderService,_catalogRepository);
            _catalogService = new CatalogService(_catalogRepository,_orderService);
            _paymentService = new FakePaymentService();
            _incentiveRepository = new TestIncentiveRepository();
            _incentiveService = new IncentiveService(_incentiveRepository);

            //this service throws the sent mailers into a collection
            //and does not use SMTP
            _mailerService = new TestMailerService();
            _inventoryRepository = new TestInventoryRepository();
            _inventoryService = new InventoryService(_inventoryRepository,_catalogService);
            _mailerRepository = new TestMailerRepository();
            _pipeline=new DefaultPipeline(
                _addressValidation,_paymentService,
                _orderService,_mailerService,
                _inventoryService
                );


        }
예제 #2
0
        public void Startup()
        {
            _orderRepository           = new TestOrderRepository();
            _catalogRepository         = new TestCatalogRepository();
            _addressValidation         = new TestAddressValidator();
            _shippingRepository        = new TestShippingRepository();
            _shippingService           = new SimpleShippingService(_shippingRepository);
            _taxRepository             = new TestTaxRepository();
            _taxService                = new RegionalSalesTaxService(_taxRepository);
            _orderService              = new OrderService(_orderRepository, _catalogRepository, _shippingRepository, _shippingService);
            _personalizationRepository = new TestPersonalizationRepository();
            _personalizationService    = new PersonalizationService(_personalizationRepository, _orderRepository, _orderService, _catalogRepository);
            _catalogService            = new CatalogService(_catalogRepository, _orderService);
            _paymentService            = new FakePaymentService();
            _incentiveRepository       = new TestIncentiveRepository();
            _incentiveService          = new IncentiveService(_incentiveRepository);

            //this service throws the sent mailers into a collection
            //and does not use SMTP
            _mailerService       = new TestMailerService();
            _inventoryRepository = new TestInventoryRepository();
            _inventoryService    = new InventoryService(_inventoryRepository, _catalogService);
            _mailerRepository    = new TestMailerRepository();
            _pipeline            = new DefaultPipeline(
                _addressValidation, _paymentService,
                _orderService, _mailerService,
                _inventoryService
                );
        }
예제 #3
0
 public IncentiveController(IMasterService masterService, IIncentiveService incentiveService, IDealerManpowerService manpowerService)
 {
     this.masterService = masterService;
     this.incentiveService = incentiveService;
     this.manpowerService = manpowerService;
     if (System.Web.HttpContext.Current.Session["BreadcrumbList"] == null) {
         System.Web.HttpContext.Current.Session["BreadcrumbList"] = new List<BreadcrumbModel>();
     }
 }
예제 #4
0
 public CommissionTierService(
     ICommissionTierRepository commissionTierRepository,
     IQualificationsService qualificationService,
     IIncentiveService incentiveService)
 {
     _commissionTierRepository = commissionTierRepository;
     _qualificationService     = qualificationService;
     _incentiveService         = incentiveService;
 }
예제 #5
0
 public CommissionsService(
     ICommissionTierService commissionTierService,
     IQualificationsService qualificationsService,
     IIncentiveService incentivesService)
 {
     _commissionTierService = commissionTierService;
     _qualificationsService = qualificationsService;
     _incentivesService     = incentivesService;
 }
예제 #6
0
        /// <summary>
        /// Overloaded constructor for testing
        /// </summary>
        public OrderController(IOrderService cartService,
            ICatalogService catalogService, 
            IAddressValidationService addressValidator, 
            IShippingService shippingService,
            IPaymentService paymentService,
            IPipelineEngine pipeline,
            ISalesTaxService taxService,
            IIncentiveService incentiveService
            ) {

            _orderService = cartService;
            _catalogService = catalogService;
            _addressValidator = addressValidator;
            _shippingService = shippingService;
            _paymentService = paymentService;
            _pipeline = pipeline;
            _taxService = taxService;
            _incentiveService = incentiveService;
        }
예제 #7
0
 /// <summary>
 /// Overloaded constructor for testing
 /// </summary>
 public OrderController(IOrderService cartService,
                        ICatalogService catalogService,
                        IAddressValidationService addressValidator,
                        IShippingService shippingService,
                        IPaymentService paymentService,
                        IPipelineEngine pipeline,
                        ISalesTaxService taxService,
                        IIncentiveService incentiveService
                        )
 {
     _orderService     = cartService;
     _catalogService   = catalogService;
     _addressValidator = addressValidator;
     _shippingService  = shippingService;
     _paymentService   = paymentService;
     _pipeline         = pipeline;
     _taxService       = taxService;
     _incentiveService = incentiveService;
 }