public void BarbecueRepo_AddToList_GetShouldReturnCorretCount()
        {
            //Arrange
            Barbecue            barbecue = new Barbecue();
            Barbecue_Repository repo     = new Barbecue_Repository();

            _barbecueRepo.AddBarbecueToList(barbecue);

            //Act
            List <Barbecue> actualList = _barbecueRepo.GetBarbecueList();

            int expected = 1;
            int actual   = actualList.Count;

            //Assert
            Assert.AreEqual(expected, actual);
        }
Пример #2
0
        //Create new Barbecue
        private void CreateNewBarbecue()
        {
            Console.Clear();
            Barbecue newBarbecue = new Barbecue();

            //Date
            Console.WriteLine("Enter the date of the barbecue. (YYYY, MM, DD):");
            string   dateAsString = Console.ReadLine();
            DateTime dateAsDate   = Convert.ToDateTime(dateAsString);

            newBarbecue.Date = dateAsDate;

            //Venue
            Console.WriteLine("Enter the venue of the barbecue");
            newBarbecue.Venue = Console.ReadLine();

            //Meat Burgers Sold
            Console.WriteLine("How man Meat Burgers were sold at this barbecue?");
            string meatAsString = Console.ReadLine();

            newBarbecue.MeatBurgersSold = int.Parse(meatAsString);

            //Vegie Burgers Sold
            Console.WriteLine("How man Veggie Burgers were sold at this barbecue?");
            string veggieAsString = Console.ReadLine();

            newBarbecue.VeggieBurgersSold = int.Parse(veggieAsString);

            //Hot Dogs Sold
            Console.WriteLine("How many Hot Dogs were sold at the barbecue?");
            string dogsAsString = Console.ReadLine();

            newBarbecue.HotDogsSold = int.Parse(dogsAsString);

            //Ice Creams Sold
            Console.WriteLine("How many Ice Creams were sold at the barbecue?");
            string iceAsString = Console.ReadLine();

            newBarbecue.IceCreamsSold = int.Parse(iceAsString);

            _barbecueRepo.AddBarbecueToList(newBarbecue);
        }