예제 #1
0
        public void TestAddOrderToTable()
        {
            double price = 30;
            Table  t     = barContext.Tables.ToList().First();

            barService.AddOrderToTable(t, "Test order", price);
            t = barContext.Tables.Find(t.Id);
            Assert.AreEqual(1, t.PendingOrders.Count);
            Assert.AreEqual(price, t.TotalPrice);
        }
예제 #2
0
 public void AddOrder()
 {
     barService.AddOrderToTable(AddOrderSelectedTable, AddOrderSelectedDrink.Name, AddOrderSelectedDrink.RecommendedPrice);
     if (SelectedTableDetail != null)
     {
         int id = SelectedTableDetail.Id;
         SelectedTableDetail = null;
         SelectedTableDetail = barService.GetTableById(id);
     }
     Tables = new ObservableCollection <Table>(barService.GetAllTables());
 }