public void TestSetup() { _meal = ModelCreator.CreateOatMeal(); }
public static DietMeal CreateDietMeal(Diet diet, Meal meal) { return new DietMeal {Day = "0,1", Diet = diet, Meal = meal, Time = 540}; }
public static MealIngredient CreateMealIngredients(Meal meal, Ingredient ingredient, QuantityType quantityType) { return new MealIngredient { MealId = meal.Id, IngredientId = ingredient.Id, Ingredient = ingredient, Meal = meal, Quantity = 3, Optional = false, QuantityType = quantityType, QuantityTypeId = quantityType.Id }; }
public static Meal CreateOatMeal() { var milk = new Ingredient { Carb = 4.7, Fat = 0.7, Protein = 3.3, Kcal = 38, Name = "Melk", Id = 4 }; var whey = new Ingredient { Carb = 0.4, Fat = 3, Protein = 86, Kcal = 360, Name = "Whey-100" }; var oatMeal = new Ingredient { Carb = 61, Fat = 7, Protein = 13, Kcal = 365, Name = "Havregryn" }; var meal = new Meal { Name = "HavreShake" }; var glass = new QuantityType { Name = "Glass", Id = 14 }; var mealIngredientMilk = new MealIngredient { Ingredient = milk, IngredientId = 4, Meal = meal, Quantity = 1.2, QuantityType = glass, QuantityTypeId = 14 }; var gram = new QuantityType { Name = "Gram", Id = 1 }; var mealIngredientWhey = new MealIngredient { Ingredient = whey, IngredientId = 5, Meal = meal, Quantity = 37, QuantityType = gram, QuantityTypeId = 1 }; var mealIngredientOatMeal = new MealIngredient { Ingredient = oatMeal, IngredientId = 6, Quantity = 40, QuantityType = gram, Meal = meal, QuantityTypeId = 1 }; meal.MealIngredients = new List<MealIngredient> { mealIngredientMilk, mealIngredientOatMeal, mealIngredientWhey }; return meal; }
public MealCalculator(Meal meal, IIngredientQuantityRepository ingredientQuantityRepository) { _meal = meal; _ingredientQuantityRepository = ingredientQuantityRepository; }