Example #1
0
        private void AddNewItems()
        {
            KomodoCafeContent newItems = new KomodoCafeContent();

            Console.WriteLine("Please enter the menu item number:");
            string mealNumberString = Console.ReadLine();

            newItems.MealNumber = int.Parse(mealNumberString);

            Console.WriteLine("Please enter the meal name:");
            newItems.MealName = Console.ReadLine();

            Console.WriteLine("Please enter the meal description:");
            newItems.MealDescription = Console.ReadLine();

            Console.WriteLine("Please enter the meal ingredients:");
            newItems.MealIngredients = Console.ReadLine();

            Console.WriteLine("Please enter the meal price:");
            newItems.MealPrice = Convert.ToDouble(Console.ReadLine());
            //string mealPriceAsString = Console.ReadLine();
            //newItems.MealPrice = double.Parse(mealPriceAsString);

            _contentRepo.AddMenuItems(newItems);
        }
        public void Arrange()
        {
            _content = new KomodoCafeContent(1, "HumCar", "Hummus and Baby Carrots", "Hummus, Baby Carrots", 2.99);
            _repo    = new MenuContentRepository();

            _repo.AddMenuItems(_content);
        }
        public void AddToList_ReturnNotNull()
        {
            KomodoCafeContent content = new KomodoCafeContent();

            content.MealName = "HumCar";
            MenuContentRepository repository = new MenuContentRepository();

            repository.AddMenuItems(content);
            KomodoCafeContent contentfromMenu = repository.GetMenuItemsToDelete("HumCar");

            Assert.IsNotNull(contentfromMenu);
        }