public static void CashierMenu() { Console.WriteLine("Digite el numero de mesa: "); int table_id = Convert.ToInt16(Console.ReadLine()); BillLogic billLogic = new BillLogic(table_id); foreach (var order in billLogic.OrdersToPayInTheSameTable) { Console.WriteLine(order.ID + ". Mesa: " + order.Table + ". " + order.Product.Name + "\n"); } int answer; do { Console.WriteLine("Digite la orden que desea agregar: "); int orderid = Convert.ToInt16(Console.ReadLine()); billLogic.AddOrderToABill(orderid); Console.WriteLine("Desea agregar otra orden: 1-Si 2-No"); answer = Convert.ToInt16(Console.ReadLine()); } while (answer == 1); Console.WriteLine("Digite el nombre para la factura: "); string nombre = Console.ReadLine(); Console.WriteLine("Digite el id para la factura: "); int id = Convert.ToInt16(Console.ReadLine()); Bill bill = billLogic.CreateBill(id, nombre); Console.WriteLine(bill.Name + bill.Orders + bill.Tax + bill.Cost + bill.FinalCost); }
public void ABillIsCreated() { BillLogic logic = new BillLogic(1); Bill bill = logic.CreateBill(1, "Jeremy Cerdas"); Assert.IsNotNull(bill); }
public void AddAnOrderToAnExistingBill() { BillLogic logic = new BillLogic(1); Bill bill = logic.CreateBill(2, "Jeremy Cerdas"); Order OrderAdded = logic.AddOrderToABill(1); Assert.IsNotNull(OrderAdded); }