public void Scan_ThreeASkus_TotalIs130() { var calculator = new Calculator(); var checkout = new CheckOut(this, calculator); _productPriceToReturn = 50; checkout.Scan("A"); checkout.Scan("A"); checkout.Scan("A"); Assert.AreEqual(130, calculator.Total()); }
public void ScanTwoItems_TotalIs80() { var calculator = new Calculator(); var checkout = new CheckOut(this, calculator); _productPriceToReturn = 50; checkout.Scan("A"); _productPriceToReturn = 30; checkout.Scan("B"); Assert.That(calculator.Total(), Is.EqualTo(80)); }
public void ScanMultipleDiscountedItems() { var calculator = new Calculator(); var checkout = new CheckOut(this, calculator); _productPriceToReturn = 50; checkout.Scan("A"); checkout.Scan("A"); checkout.Scan("A"); checkout.Scan("A"); Assert.AreEqual(180, calculator.Total()); }