Skip to content

Commit

Permalink
Added the unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
tshebo committed May 29, 2023
1 parent 54608ed commit 9f402c3
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions RecipesTest/RecipeTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,18 @@ public class RecipeTests
[TestMethod]
public void TestMethod1()
{
// Arrange
RecipeManager recipeManager = new RecipeManager();
Recipe recipe = new Recipe();
recipe.Calories.Add(100);
recipe.Calories.Add(150);
recipe.Calories.Add(200);

// Act
double totalCalories = recipeManager.CalculateTotalCalories(recipe);

// Assert
Assert.AreEqual(450, totalCalories);
}
}
}

0 comments on commit 9f402c3

Please sign in to comment.