static void Main(string[] args) { Invoice cust1 = new Invoice("Jorma"); cust1.InvoiceAdd(new InvoiceItem("Milk", 1.75, 1)); cust1.InvoiceAdd(new InvoiceItem("Beer", 5.25, 1)); cust1.InvoiceAdd(new InvoiceItem("Butter", 2.50, 2)); Console.WriteLine(cust1.PrintInvoice()); }
public void TotalTest() { //arrange Invoice inv = new Invoice("asd"); inv.InvoiceAdd(new InvoiceItem("Milk", 1.75, 1)); inv.InvoiceAdd(new InvoiceItem("Beer", 5.25, 1)); double expected = 7; //act double actual = inv.Total(); //assert Assert.AreEqual(expected,actual); }