Test case for edit recipe - Jomsaruj/coffeemaker GitHub Wiki

Test ID Test Case Name Description Expected Result Actual Result Status
8 testEditValidRecipe Given CoffeeMaker with 3 recipes in the system, then we edit the third recipe (at index 2) editRecipe(int recipeToEdit, Recipe newRecipe ) should return name of edited recipe. In this case it should be "Latte" Same as expected result pass
9 testEditEmptyRecipe Given CoffeeMaker with 2 recipes in the system, then we edit the third recipe (at index 2) editRecipe(int recipeToEdit, Recipe newRecipe ) should return name of edited recipe. In this case there is no recipe at that index then it should be null Same as expected result pass
10 testEditRecipeName Given CoffeeMaker with 3 recipes in the system, then we edit the third recipe (at index 2) and try to change recipe name Recipe name at index 2 should remain unchange Recipe name at index 2 change from "Latte" to empty string fail
11 testEditAfterDelete Given CoffeeMaker with 1 recipe in the system, then we delete that recipe. After that we try to edit that index editRecipe(int recipeToEdit, Recipe newRecipe ) should return edited recipe name. In this case there are no recipe, because we already delete it so it should return null editRecipe(int recipeToEdit, Recipe newRecipe ) return empty string fail
41 testGetRecipeAfterEdit Given CoffeeMaker with 1 recipe in the system, then we edit it and call getRecipe to check whether recipe is change or not all recipe information except recipe's name should change according to the new recipe same as expected result pass