public async Task <IActionResult> OnGetAsync(int id) { Recipe = await recipeController.GetRecipeAsync(id); Ingredients = await ingredientController.GetIngredientsAsync(); Categories = await categoryController.GetAllCategoriesAsync(); return(Page()); }
public async Task GetRecipeAsync_Success(int recipeId, FullRecipe recipe) { A.CallTo(() => recipeService.GetRecipeAsync(recipeId)).Returns(recipe); var result = await sut.GetRecipeAsync(recipeId).ConfigureAwait(false); result.Should().Be(recipe); }