// #1 New Input
        private void NewEntry()
        {
            Console.Clear();
            CafeLibrary newData = new CafeLibrary();

            //MealNumber
            Console.WriteLine("Enter Number");
            string numberAsString = Console.ReadLine();
            int    numberAsInt    = int.Parse(numberAsString);

            newData.MealNumber = numberAsInt;

            //MealName
            Console.WriteLine("Meal Name");
            newData.MealName = Console.ReadLine();

            //Description
            Console.WriteLine("Brief Description");
            newData.Description = Console.ReadLine();

            //Ingredients
            Console.WriteLine("Top Five Ingredients");
            newData.Ingredients = Console.ReadLine();

            //Price
            Console.WriteLine("Meal Price $00.00");
            string priceAsString = Console.ReadLine();

            newData.Price = double.Parse(priceAsString);

            _dataRepo.AddDatatoMenu(newData);
        }
Esempio n. 2
0
        public void Arrange()
        {
            _repo = new CafeRepo();
            _data = new CafeLibrary(1, "BLT", "Bacon Lettuce and Tomato Sandwich", "Pork Bacon Lettuce, Tomato, Mayo and Rye Bread", 4.99);

            _repo.AddDatatoMenu(_data);
        }
Esempio n. 3
0
        public void AddToListNull()
        {
            // Arrange
            CafeLibrary data = new CafeLibrary();

            data.MealNumber = 1;
            CafeRepo repository = new CafeRepo();

            // Act
            repository.AddDatatoMenu(data);
            CafeLibrary dataFromDir = repository.GetDataWithMealNumber(1);

            // Assert
            Assert.IsNotNull(dataFromDir);
        }