public void Total_Of_No_Items_Scanned_Is_Zero() { var subject = new SelfCheckout(); decimal total = subject.Total(); Assert.That(total, Is.EqualTo(0m)); }
public void Total_Of_No_Items_Scanned_Is_Zero() { var subject = new SelfCheckout(); decimal total = subject.Total(); Assert.That(total, Is.EqualTo(0m)); }
public void Scanning_Multiple_Items() { var subject = new SelfCheckout(); subject = subject .Scan(price: 25, quantity: 2) .Scan(price: 10, quantity: 1) .Scan(price: 4, quantity: 1); Assert.That(subject.SubTotal(), Is.EqualTo(64.00m)); Assert.That(subject.Tax(), Is.EqualTo(3.52m)); Assert.That(subject.Total(), Is.EqualTo(67.52m)); }
public void Scanning_Multiple_Items() { var subject = new SelfCheckout(); subject = subject .Scan(price: 25, quantity: 2) .Scan(price: 10, quantity: 1) .Scan(price: 4, quantity: 1); Assert.That(subject.SubTotal(), Is.EqualTo(64.00m)); Assert.That(subject.Tax(), Is.EqualTo(3.52m)); Assert.That(subject.Total(), Is.EqualTo(67.52m)); }
public string Total() { return(FormatCurrency(selfCheckout.Total())); }