public void addPayment() { decimal expectedPayment = 10; Sale s = new OTCSale(); s.AddCashPayment(10); Assert.AreEqual(expectedPayment, s.PaymentTotal); }
public void saleChange() { decimal expectedChange = 2; Sale s = new OTCSale(); MenuProduct m1 = new MenuProduct { Price = 3 }; MenuProduct m2 = new MenuProduct { Price = 5 }; s.AddSaleLineItem(m1); s.AddSaleLineItem(m2); s.AddCashPayment(10); Assert.AreEqual(expectedChange, s.Change); }