public async void Can_get_ingredients_by_name_substring() { using var context = new RecAPIContext(ContextOptions); var controller = new IngredientsController(context); var ingredientActionResult = await controller.GetIngredientsByNameSubstring("Fu"); var ingredients = (ingredientActionResult.Result as OkObjectResult).Value as IEnumerable <IngredientDTO>; Assert.Equal(2, ingredients.Count()); }