public void Arrange() { _repo = new Menu(); _content = new MenuRepositoryClass("1", "Jumbolaya", "A popular dish of West African, French, and Spanish influence", "consisting mainly of meat and vegetables mixed with rice.", 10.99, MealType.Dinner); _repo.AddContentToList(_content); }
public void SetMealNumber_ShouldSetCorrectString() { MenuRepositoryClass content = new MenuRepositoryClass(); content.MealNumber = "1"; string expected = "1"; String actual = content.MealNumber; Assert.AreEqual(expected, actual); }
public void UpdateExistingContent_ShouldMatchGivenbool(string originalMealNumber, bool shouldUpdate) { //Arrange //TestInitialize - Already have MenuRepositoryClass newContent = new MenuRepositoryClass("2", "Huevos Rancheros", "Eggs served in the style of the traditional large mid-morning fare on rural Mexican farms", "Black beans, feta cheese, corn tortillas, spicy sauce, olive oil", 7.99, MealType.Breakfast); //Act bool updateResult = _repo.UpdateExistingContent("2", newContent); // Assert Assert.IsTrue(updateResult); }
public void AddToList_ShouldGetNotNull() { //Arrange ---> setting up the playing field MenuRepositoryClass content = new MenuRepositoryClass(); content.MealNumber = "1"; Menu repository = new Menu(); //Act repository.AddContentToList(content); MenuRepositoryClass contentFromDirectory = repository.GetContentByMealNumber("1"); // Assert Assert.IsNotNull(contentFromDirectory); }
public void TestMethod1() { MenuItems menuItems = new MenuItems(); menuItems.MealName = "Hamburger"; menuItems.Description = "The best hamburger in the state!"; menuItems.Price = 5; menuItems.MealNumber = 1; menuItems.Ingredients = "Hamburger"; MenuRepositoryClass repo = new MenuRepositoryClass(); repo.AddMenuItemsToList(menuItems); List <MenuItems> localList = repo.ReturnList(); int actual = localList.Count; }