示例#1
0
        public async void Can_get_ingredient_with_recipe()
        {
            using var context = new RecAPIContext(ContextOptions);
            var controller = new IngredientsController(context);

            var ingredientActionResult = await controller.GetRecipeIngredientsOfIngredient(2);

            var recipeIngredients = (ingredientActionResult.Result as OkObjectResult).Value as IEnumerable <RecipeIngredientDTO>;

            Assert.Equal("Pure Garlic", recipeIngredients.FirstOrDefault().RecipeName);
        }