public void CreateReport_CalculatesQuantityOfSpecificIngredient_ForSpecificMenuItem_Expect95() { // Arrange var reporter = new KeyIngredientToOrderForMenuItemBasedOnPortionsSold(fakeRepos); // Act var result = reporter.CreateReport(1, 1, 11, 2018); // Assert Assert.AreEqual(95, result.Quantity); }
public void CreateReport_SetKeyIngredientToOrderForNextMonth_BasedOnProvidedIngredientId_ExpectEggs() { // Arrange const int month = 11; const int year = 2018; var reporter = new KeyIngredientToOrderForMenuItemBasedOnPortionsSold(fakeRepos); // Act var result = reporter.CreateReport(mentItemIdForTiramisu, ingredientIdForEggs, month, year); // Assert Assert.AreEqual("Eggs", result.KeyIngredientToOrderForNextMonth); }
public void CreateReport_CalculatesNumOfEggsToOrderFromSuppliers_ForMakingTiramisuForAllRestaurantsForASpecificMonth_Expect95() { // Arrange const int month = 11; const int year = 2018; var reporter = new KeyIngredientToOrderForMenuItemBasedOnPortionsSold(fakeRepos); // Act var result = reporter.CreateReport(mentItemIdForTiramisu, ingredientIdForEggs, month, year); // Assert Assert.AreEqual(95, result.Quantity); }
public void CreateReport_GetListOfRestaurantsAndPortionsForASpecificMenuItemSold_ForSpecificMonth_ExpectRestaurantNamesInList() { // Arrange const int month = 11; const int year = 2018; var reporter = new KeyIngredientToOrderForMenuItemBasedOnPortionsSold(fakeRepos); // Act var report = reporter.CreateReport(mentItemIdForTiramisu, ingredientIdForEggs, month, year); var result = report.RestaurantPortions.Where(x => !string.IsNullOrEmpty(x.Restaurant)).Count(); // Assert Assert.AreEqual(report.RestaurantPortions.Count, result); }