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 CoffeesController(repository, calculationService); }
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 CoffeesController(repository, calculationService); }
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 CoffeesController(repository, calculationService, pageUrlRetriever); }