public void SetUp()
        {
            var price = new ProductCatalogPrices(0m, 0m, 0m, 0m, Substitute.For <CurrencyInfo>(), null);
            var calculationService = Substitute.For <ICalculationService>();
            var skuInfo            = Substitute.For <SKUInfo>();

            calculationService.CalculatePrice(skuInfo).Returns(price);

            var repository = MockDataSource(skuInfo);

            mController = new BrewersController(repository, calculationService);
        }
示例#2
0
        public void SetUp()
        {
            var price              = new ProductPrice();
            var shoppingService    = Substitute.For <ShoppingService>();
            var pricingService     = Substitute.For <PricingService>();
            var calculationService = Substitute.For <CalculationService>(shoppingService, pricingService);
            var skuInfo            = Substitute.For <SKUInfo>();

            calculationService.CalculateListingPrice(skuInfo).Returns(price);

            var repository = MockDataSource(skuInfo);

            mController = new BrewersController(repository, calculationService);
        }
示例#3
0
        public void SetUp()
        {
            var price = new ProductCatalogPrices(0m, 0m, 0m, 0m, Substitute.For <CurrencyInfo>(), null);
            var calculationService = Substitute.For <ICalculationService>();
            var pageUrlRetriever   = Substitute.For <IPageUrlRetriever>();

            pageUrlRetriever.Retrieve(Arg.Any <TreeNode>(), Arg.Any <bool>()).Returns(new PageUrl {
                RelativePath = URL
            });
            var skuInfo = Substitute.For <SKUInfo>();

            calculationService.CalculatePrice(skuInfo).Returns(price);

            var repository = MockDataSource(skuInfo);

            controller = new BrewersController(repository, calculationService, pageUrlRetriever);
        }