public void return_zero_when_the_cart_is_empty() { var cartItems = new List <CartItem>(); var actualPrice = _calculator.ComputePrice(cartItems, null); Check.That(actualPrice.DeliveryCost).IsEqualTo(0); Check.That(actualPrice.ProductCost).IsEqualTo(0); }
public void Empty_Cart_Price_Is_Zero() { var cartItems = new List <CartItem>(); var actualPrice = _calculator.ComputePrice(cartItems, null); Check.That(actualPrice.DeliveryCost).IsEqualTo(0); Check.That(actualPrice.ProductCost).IsEqualTo(0); }
public void WhenICalculateTheTotalPrice() { var products = _scenarioContext["Cart"] as List <CartItem>; var discountCode = _scenarioContext["Code"] as string; var calculator = new CartPriceCalculator(); var price = calculator.ComputePrice(products, discountCode); _scenarioContext["Price"] = price; }