public void Checkout_Products_Price(string productist, int finalPrice) { var checkout = new Checkout(); checkout.AddProductRuleRange(_productRules); var price = checkout.GetPrice(productist); Assert.AreEqual(finalPrice, price); }
public void QuandoVadoAPagare() { var productRules = ScenarioContext.Current.Retrieve<List<IProductRule>>("productRules"); var productList = ScenarioContext.Current["productList"].ToString(); var checkout = new Checkout(); checkout.AddProductRuleRange(productRules); var finalPrice = checkout.GetPrice(productList); ScenarioContext.Current.Add("finalPrice", finalPrice); }