public void LoadTest() { List <Meal> meals = new List <Meal>(); meals = MealManager.Load(); Assert.AreEqual(5, meals.Count()); }
public void DeleteTest() { List <Meal> meals = MealManager.Load(); Meal meal = meals.FirstOrDefault(u => u.Description == "Breakfast"); int results = MealManager.Delete(meal, true); Assert.IsTrue(results > 0); }
public void InsertTest() { List <Meal> meals = MealManager.Load(); FoodItem foodItem = new FoodItem(); foodItem.Id = Guid.NewGuid(); foodItem.FDCId = 5555555; foodItem.MealId = meals.FirstOrDefault(m => m.Description == "Breakfast").Id; foodItem.Quantity = 999; int results = FoodItemManager.Insert(foodItem, true); Assert.IsTrue(results > 0); }
public IEnumerable <Meal> Get(Guid userid) { return(MealManager.Load(userid)); }
// GET api/values public IEnumerable <Meal> Get() { return(MealManager.Load()); }