public void AddToCafe_ShouldGetNotNull() { //Arrange //Act _repo.AddItemToCafe(_item); Cafe itemFromDirectory = _repo.GetItemByNumber(9); //Assert Assert.IsTrue(_repo.GetCafeItemList().Contains(itemFromDirectory)); }
private void DisplayItemByNumber() { Console.Clear(); Console.WriteLine("Enter the item number for the Cafe item you would like to see:"); int input = int.Parse(Console.ReadLine()); Cafe itemNum = _CafeRepo.GetItemByNumber(input); if (itemNum != null) { Console.WriteLine($"#: {itemNum.ItemNumber}\n" + $"Name: {itemNum.Name}\n" + $"Description: {itemNum.Description}\n" + $"Ingredients: {itemNum.listOfIngredients}\n" + $"Price: {itemNum.Price}"); } else { Console.WriteLine("Sorry could not find a Cafe item associated with that Cafe #."); } }