public void TwoCopiesOfTheSameBookCosts16Eur(string book) { PotterBasket basket = SetupBasket(); basket.Add(book); basket.Add(book); Assert.AreEqual(16M, basket.Total); }
public void IfYouBuyTwoDifferentBooksYouGetA5PercentDiscountOnThoseTwoBooks(string book1, string book2) { PotterBasket basket = SetupBasket(); basket.Add(book1); basket.Add(book2); Assert.AreEqual(8M * 2 * 0.95M, basket.Total); }
public void IfYouBuyThreeDifferentBooksYouGetA10PercentDiscountOnThoseThreeBooks(string book1, string book2, string book3) { PotterBasket basket = SetupBasket(); basket.Add(book1); basket.Add(book2); basket.Add(book3); Assert.AreEqual(8M * 3 * 0.9M, basket.Total); }
public void With4DifferentBooksYouGetA20PercentDiscount(string book1, string book2, string book3, string book4) { PotterBasket basket = SetupBasket(); basket.Add(book1); basket.Add(book2); basket.Add(book3); basket.Add(book4); Assert.AreEqual(8M * 4 * 0.8M, basket.Total); }
public void IfYouBuyAll5YouGetAHuge25PercentDiscount(string book1, string book2, string book3, string book4, string book5) { PotterBasket basket = SetupBasket(); basket.Add(book1); basket.Add(book2); basket.Add(book3); basket.Add(book4); basket.Add(book5); Assert.AreEqual(8M * 5 * 0.75M, basket.Total); }
public void OneCopyOfAnyOfTheFiveBooksCosts8Eur(string book) { PotterBasket basket = SetupBasket(); basket.Add(book); Assert.AreEqual(8M, basket.Total); }
public void HowMuchDoesThisBasketOfBooksCost() { PotterBasket basket = SetupBasket(); basket.Add("Harry Potter and the Philosopher's Stone"); basket.Add("Harry Potter and the Philosopher's Stone"); basket.Add("Harry Potter and the Chamber of Secrets"); basket.Add("Harry Potter and the Chamber of Secrets"); basket.Add("Harry Potter and the Prisoner of Azkaban"); basket.Add("Harry Potter and the Prisoner of Azkaban"); basket.Add("Harry Potter and the Goblet of Fire"); basket.Add("Harry Potter and the Order of the Phoenix"); Assert.AreEqual(51.20M, basket.Total); }