Exemple #1
0
        public void AddList()
        {
            Console.WriteLine("What type of event?;\n" +
                              "1. Golf\n" +
                              "2. Bowling\n" +
                              "3. Amusement\n" +
                              "4. Concert\n");
            string typeAsString = Console.ReadLine();
            int    typeAsInt    = int.Parse(typeAsString);

            EventType type = (EventType)typeAsInt;

            Console.WriteLine("What date?: ");
            DateTime date = DateTime.Parse(Console.ReadLine());

            Console.WriteLine("How many people?: ");
            int attendees = int.Parse(Console.ReadLine());

            Console.WriteLine("what is the event cost?: ");
            double costE = double.Parse(Console.ReadLine());

            Console.WriteLine("Cost per person?: ");
            double costPP = double.Parse(Console.ReadLine());

            Outing item = new Outing(type, attendees, date, costE, costPP);

            Console.ReadLine();

            _OutingRepo.AddtoList(item);
        }
        public void AddTest()
        {
            OutingRepo outingRepo = new OutingRepo();
            Outing     item       = new Outing();

            outingRepo.AddtoList(item);

            List <Outing> list = outingRepo.ReturnOutingList();

            Assert.AreEqual(1, list.Count);
        }