Пример #1
0
        public StoreControllerTests()
        {
            var cache = new MemoryCache(new MemoryCacheOptions());

            _store      = new StoreServiceMock(cache);
            _controller = new StoreController(_store);
        }
Пример #2
0
        public MarkdownPromotionControllerTests()
        {
            var cache = new MemoryCache(new MemoryCacheOptions());

            _store      = new StoreServiceMock(cache);
            _markdowns  = new MarkdownPromotionServiceMock(cache);
            _controller = new MarkdownPromotionController(_markdowns, _store);
        }
Пример #3
0
        public MultiplesPromotionControllerTests()
        {
            var cache = new MemoryCache(new MemoryCacheOptions());

            _store      = new StoreServiceMock(cache);
            _multiples  = new MultiplesPromotionServiceMock(cache);
            _controller = new MultiplesPromotionController(_multiples, _store);
        }
Пример #4
0
        public BogoPromotionControllerTests()
        {
            MemoryCache cache = new MemoryCache(new MemoryCacheOptions());

            _store      = new StoreServiceMock(cache);
            _bogos      = new BogoPromotionServiceMock(cache);
            _controller = new BogoPromotionController(_bogos, _store);
        }
        public CartTests()
        {
            MemoryCache cache = new MemoryCache(new MemoryCacheOptions());

            _cart      = new CartServiceMock(cache);
            _store     = new StoreServiceMock(cache);
            _markdowns = new MarkdownPromotionServiceMock(cache);
            _bogos     = new BogoPromotionServiceMock(cache);
            _multiples = new MultiplesPromotionServiceMock(cache);
        }
Пример #6
0
        public CartControllerTests()
        {
            var cache = new MemoryCache(new MemoryCacheOptions());

            _cart      = new CartServiceMock(cache);
            _store     = new StoreServiceMock(cache);
            _markdowns = new MarkdownPromotionServiceMock(cache);
            _bogos     = new BogoPromotionServiceMock(cache);
            _multiples = new MultiplesPromotionServiceMock(cache);

            _controller = new CartController(_cart, _store, _markdowns, _multiples, _bogos);
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="CartController" /> class.
 /// </summary>
 /// <param name="cartService">The cart service.</param>
 /// <param name="storeService">The store service.</param>
 /// <param name="markdownService">The markdown service.</param>
 /// <param name="multiplesService">The multiples service.</param>
 /// <param name="bogosService">The bogos service.</param>
 public CartController(BaseCacheService <CartItem> cartService,
                       BaseCacheService <StoreItem> storeService,
                       BaseCacheService <MarkdownPromotion> markdownService,
                       BaseCacheService <MultiplesPromotion> multiplesService,
                       BaseCacheService <BogoPromotion> bogosService)
 {
     _cart      = cartService;
     _store     = storeService;
     _bogos     = bogosService;
     _markdowns = markdownService;
     _multiples = multiplesService;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="BogoPromotionController"/> class.
 /// </summary>
 /// <param name="bogoService">The bogo service.</param>
 /// <param name="storeService">The store service.</param>
 public BogoPromotionController(BaseCacheService <BogoPromotion> bogoService, BaseCacheService <StoreItem> storeService)
 {
     _bogos = bogoService;
     _store = storeService;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="StoreController"/> class.
 /// </summary>
 /// <param name="service">The service.</param>
 public StoreController(BaseCacheService <StoreItem> service)
 {
     _store = service;
 }
Пример #10
0
 /// <summary>
 /// Initializes a new instance of the <see cref="MultiplesPromotionController"/> class.
 /// </summary>
 /// <param name="multiplesService">The multiples service.</param>
 /// <param name="storeService">The store service.</param>
 public MultiplesPromotionController(BaseCacheService <MultiplesPromotion> multiplesService, BaseCacheService <StoreItem> storeService)
 {
     _multiples = multiplesService;
     _store     = storeService;
 }
Пример #11
0
 /// <summary>
 /// Initializes a new instance of the <see cref="MarkdownPromotionController"/> class.
 /// </summary>
 /// <param name="markdownService">The markdown service.</param>
 /// <param name="storeService">The store service.</param>
 public MarkdownPromotionController(BaseCacheService <MarkdownPromotion> markdownService, BaseCacheService <StoreItem> storeService)
 {
     _markdowns = markdownService;
     _store     = storeService;
 }