public void Init() { mealAllowedContent = new List <string>(); mealAllowedContent.Add("Meat"); mealAllowedContent.Add("Fish"); mealAllowed = new MealAllowed(mealAllowedContent); dictionaryMealAllowed = new Dictionary <string, int>(); dictionaryMealAllowed.Add("Meat", 0); dictionaryMealAllowed.Add("Fish", 0); }
public void Init() { IList <string> mealAllowedContent = new List <string>(); mealAllowedContent.Add("Meat"); mealAllowedContent.Add("Fish"); mealAllowed = new MealAllowed(mealAllowedContent); dictionaryMealAllowed.Add("Meat", 0); dictionaryMealAllowed.Add("Fish", 0); var mealDicoEstimatedForTable1 = new Dictionary <string, int>(); mealDicoEstimatedForTable1.Add("Meat", 1); mealDicoEstimatedForTable1.Add("Fish", 1); tableNumberFoodEstimated.Add(new TableMealsNumbers("Table-1", mealDicoEstimatedForTable1)); var mealDicoEstimatedForTable2 = new Dictionary <string, int>(); mealDicoEstimatedForTable2.Add("Meat", 1); mealDicoEstimatedForTable2.Add("Fish", 0); tableNumberFoodEstimated.Add(new TableMealsNumbers("Table-2", mealDicoEstimatedForTable2)); }
public static Table Of(string identifiant, string name, string firstname, string meal, MealAllowed mealAllowed) { if (!mealAllowed.Had(meal)) { throw new GiveTheChoiceException($"The meal {meal} don't respect the meal allowed"); } return(new Table(identifiant, name, firstname, meal)); }