public void ItShouldReturnTheCorrectCostOfTwoOranges() { var orange = new Orange(); CheckoutCounter.Scan(orange); CheckoutCounter.Scan(orange); Assert.That(CheckoutCounter.Total(), Is.EqualTo(orange.GetCost() * 2)); }
public void ItShouldReturnCorrectPriceIf2OfTheSameItemIsScanned() { var orange = new Orange(); CheckoutCounter.Scan(orange); CheckoutCounter.Scan(orange); Assert.That(CheckoutCounter.Total(), Is.EqualTo(orange.GetCost() * 2)); }
public void ItShouldReturnCorrectPriceFor2DifferentItemsAreScanned() { var apple = new Apple(); var orange = new Orange(); CheckoutCounter.Scan(apple); CheckoutCounter.Scan(orange); Assert.That(CheckoutCounter.Total(), Is.EqualTo(apple.GetCost() + orange.GetCost())); }
public void ItShouldReturnTheCorrectTotalForBananaTwoForAPoundDiscountWhenInDifferentOrder() { var banana = new Banana(); var orange = new Orange(); var apple = new Apple(); CheckoutCounter.Scan(banana); CheckoutCounter.Scan(orange); CheckoutCounter.Scan(banana); CheckoutCounter.Scan(apple); Assert.That(CheckoutCounter.Total(), Is.EqualTo(1.00M + orange.GetCost() + apple.GetCost())); }