public void SpecialNotEnough() { var productsSpecialsQuantities = GetProductsSpecialsQuantities("productsSpecialsQuantities5.json"); var service = new TrolleyTotalService(); Assert.AreEqual(service.GetLowestTotal(productsSpecialsQuantities), 25.3); }
public void UnusedSpecials() { var productsSpecialsQuantities = GetProductsSpecialsQuantities("productsSpecialsQuantities4.json"); var service = new TrolleyTotalService(); Assert.AreEqual(service.GetLowestTotal(productsSpecialsQuantities), 13.8); }
public void CombinationsWithEqualLowest() { var productsSpecialsQuantities = GetProductsSpecialsQuantities("productsSpecialsQuantities3.json"); var service = new TrolleyTotalService(); Assert.AreEqual(service.GetLowestTotal(productsSpecialsQuantities), 8); }
public void UseMultipleSpecials() { var productsSpecialsQuantities = GetProductsSpecialsQuantities("productsSpecialsQuantities2.json"); var service = new TrolleyTotalService(); Assert.AreEqual(service.GetLowestTotal(productsSpecialsQuantities), 10); }
public AnswersController( ChallengeConfig challengeConfig, ProductSortService productSortService, HelperResourceService helperResourceService, TrolleyTotalService trolleyTotalService, ILogger <AnswersController> logger) : base() { _challengeConfig = challengeConfig; _productSortService = productSortService; _helperResourceService = helperResourceService; _trolleyTotalService = trolleyTotalService; _logger = logger; }
public void Initialize() { _trolleyTotalService = new TrolleyTotalService(); }
public TrolleyTotalController(TrolleyTotalService service) { _service = service; }