public void TestDeleteMenu() { RestaurantSeeder.Seed(); var bo = new MenuBusinessObject(); var resList = bo.List(); var total = resList.Result.Count; var resDelete = bo.Delete(resList.Result.First().Id); resList = bo.ListNonDeleted(); Assert.IsTrue(resDelete.Success && resList.Success && resList.Result.Count == total - 1); }
public void TestUpdateMenu() { RestaurantSeeder.Seed(); var bo = new MenuBusinessObject(); var resList = bo.List(); var item = resList.Result.FirstOrDefault(); var now = DateTime.Now; item.Date = now; var resUpdate = bo.Update(item); resList = bo.ListNonDeleted(); Assert.IsTrue(resList.Success && resUpdate.Success && resList.Result.First().Date == now); }