public void Compute_Sum_of_products_when_several_products_are_added() { var cashRegister = new CashRegister(); var price = cashRegister.Add("Bananes"); price = cashRegister.Add("Cerises"); Check.That(price).IsEqualTo(225); }
public void Apply_Discount_On_Cerises() { var cashRegister = new CashRegister(); var price = cashRegister.Add("Cerises"); price = cashRegister.Add("Cerises"); Check.That(price).IsEqualTo(130); }
public void Offer_second_bananas() { var cashRegister = new CashRegister(); var price = cashRegister.Add("Bananes"); price = cashRegister.Add("Bananes"); Check.That(price).IsEqualTo(Prices.BananaPrice); }
public void Apply_Discount_On_Mele() { var cashRegister = new CashRegister(); cashRegister.Add("Mele"); var price = cashRegister.Add("Mele"); Check.That(price).IsEqualTo(Prices.ApplePrice); }
public void Apply_Discount_On_Apples(string product) { var cashRegister = new CashRegister(); cashRegister.Add(product); cashRegister.Add(product); cashRegister.Add(product); var price = cashRegister.Add(product); Check.That(price).IsEqualTo(4 * Prices.ApplePrice - 100); }
public void Parse_multiple_products_separated_with_a_comma() { var cashRegister = new CashRegister(); var price = cashRegister.Add("Pommes, Cerises, Bananes"); Check.That(price).IsEqualTo(325); }
public void Display_Bananes_Price() { var cashRegister = new CashRegister(); var price = cashRegister.Add("Bananes"); Check.That(price).IsEqualTo(Prices.BananaPrice); }
public void Display_Cerises_Price() { var cashRegister = new CashRegister(); var price = cashRegister.Add("Cerises"); Check.That(price).IsEqualTo(Prices.CherryPrice); }
public void Display_Pommes_Price(string product) { var cashRegister = new CashRegister(); var price = cashRegister.Add(product); Check.That(price).IsEqualTo(Prices.ApplePrice); }
public void Accept_Iteration_6() { var cashRegister = new CashRegister(); var price = cashRegister.Add("Mele, Apples, Apples, Mele"); Check.That(price).IsEqualTo(200); Check.That(price).IsEqualTo(100); }
public void AmountDifferenceWith_Should_Calcul_Difference_Between_Given_Amount_And_Inserted_Money(double amountToCheck, double insertedMoney, double expectedAmountDifference) { // GIVEN CashRegister cashRegister = new CashRegister(); cashRegister.Add(insertedMoney); // WHEN double amountDifference = cashRegister.DifferenceWith(amountToCheck); // THEN Check.That(amountDifference).IsEqualTo(expectedAmountDifference); }
public void HaveSufficientMoneyFor_Should_Return_False_When_Enough_Money_Is_Inserted(double insertedMoney, double minimumNeededMoney) { // GIVEN CashRegister cashRegister = new CashRegister(); cashRegister.Add(insertedMoney); // WHEN bool haveSufficientMoneyFor = cashRegister.IsInsertedAmountLessThan(minimumNeededMoney); // THEN Check.That(haveSufficientMoneyFor).IsFalse(); }