Ejemplo n.º 1
0
        public void AddToDirectory_ShouldGetCorrectBoolean()
        {
            //arrange
            MenuContent           content    = new MenuContent();
            MenuContentRepository repository = new MenuContentRepository();
            //act
            bool addResult = repository.AddContentToDirectory(content);

            //assert
            Assert.IsTrue(addResult);
        }
Ejemplo n.º 2
0
        public void GetDirectory_ShouldReturnCorrectCollection()
        {
            //Arrange, Act Assert
            MenuContent           newObject = new MenuContent();
            MenuContentRepository repo      = new MenuContentRepository();

            repo.AddContentToDirectory(newObject);
            List <MenuContent> listOfContents = repo.GetContents();
            bool directoryHasContent          = listOfContents.Contains(newObject);

            Assert.IsTrue(directoryHasContent);
        }
        private void CreateNewContent()
        {
            Console.WriteLine("Your current menu items:");
            ShowAllContent();
            MenuContent content = new MenuContent();

            Console.WriteLine("Please enter the number of the menu item:");
            // may have to get the array number and put in a string?
            string menuNumber = Console.ReadLine();

            content.MenuNumber = menuNumber;
            Console.WriteLine("Please enter the name of the menu item:");
            content.MenuName = Console.ReadLine();
            Console.WriteLine($"Please enter the description of the menu item number {content.MenuNumber}:");
            content.MenuDescription = Console.ReadLine();
            Console.WriteLine($"Please enter the list of ingredients for iten {content.MenuNumber}:");
            content.MenuListOfIngredients = Console.ReadLine();
            Console.WriteLine($"Please enter the menu item price for item {content.MenuNumber}:");
            content.MenuPrice = Console.ReadLine();
            //pass to add method
            _menuRepo.AddContentToDirectory(content);
        }
Ejemplo n.º 4
0
 public void Arrange()
 {
     _repo    = new MenuContentRepository();
     _content = new MenuContent("1", "Pizza", "Thick crust pepperoni pizza", "Dough, Sauce, Pizza", "12.00");
     _repo.AddContentToDirectory(_content);
 }