Example #1
0
        public void GetAllOutingsTest()
        {
            //ARRANGE
            SeedContentList();

            //ACT
            List <Outing> allOutings = _repo.GetAllOutings();

            //ASSERT
            Assert.AreEqual(5, allOutings.Count);
        }
Example #2
0
        public void DisplayOutings()
        {
            Console.Clear();
            List <Outing> allOutings = _repo.GetAllOutings();

            Console.WriteLine($"\n{"Event Type",-25} {"Attendance",-15} {"Date",-10} {"Total Cost",-15} {"Cost Per Person",-10}\n");
            foreach (Outing outing in allOutings)
            {
                Console.WriteLine($"{outing.EventType,-25} {outing.NumberOfPeople,-15} {outing.Date.ToShortDateString(),-10} ${outing.TotalCostForEvent,-15} ${outing.TotalCostPerPerson,-10}");
            }
            double totalCost = _repo.TotalCost();

            Console.WriteLine($"\nTotal cost for all events: ${totalCost}");
            Console.ReadKey();
        }