public void CreateMealPlan_FirstMeal_IsRandomRecipeFromCookBook() { var cookbook = new StubCookBook(); var plan = MealPlan.Create(new StubCookBook()); cookbook.GetAllRecipes().Any(x => x.Name == plan.Meals.First().Recipe.Name).ShouldBeTrue(); }
public void CreateMealPlan_WherePossible_MealsArentDuplicatedInAPlan() { const int mealsToPlan = 3; var cookbook = new StubCookBook(); var plan = MealPlan.Create(cookbook, mealsToPlan); //First assertion is to check that we have enough stub data to allow the test to succeed. cookbook.GetAllRecipes().Count.ShouldBeGreaterThanOrEqualTo(mealsToPlan); plan.Meals.DistinctBy(x => x.Recipe.Name).Count().ShouldEqual(plan.Meals.Count); }