public void DisplayAllEvents() { // Display headings DisplayHeadingsHelper(); if (AllEvents.GetAllOutings().Count != 0) { foreach (Outing each in AllEvents.GetAllOutings()) { DisplaySingleOutingHelper(each); } } }
public void GetAllOutingsTest() { Outing outing = new Outing(Outing.TypeOfOuting.Golf, 16, new DateTime(2019, 7, 10), 3000); OutingRepo repo = new OutingRepo(); repo.AddOutingToRepo(outing); Outing outingTwo = new Outing(Outing.TypeOfOuting.Bowling, 10, new DateTime(2019, 10, 31), 500); repo.AddOutingToRepo(outing); Console.WriteLine(repo.GetAllOutings()[1].OutingAttendance); Assert.AreEqual(2, repo.GetAllOutings().Count); }
private void DisplayAllOutings() { Console.Clear(); List <OutingContent> listContents = _repo.GetAllOutings(); //list all outings Console.WriteLine("{0,-15} {1,-12}{2,-12}{3,-12}{4,-12}", "Event Type", "# of people", "Date", "Cost/Person", "Total Cost"); foreach (OutingContent item in listContents) { Console.WriteLine($"{item.EventType,-16}{item.AttendanceNumber,-12}{item.DateOfEvent.ToString("MM/dd/yyyy"),-12}{item.CostPerPerson,-12:C}{item.TotalCost,-12:C}"); } Console.WriteLine("Press any key to continue..."); Console.ReadKey(); }
public void TestAddAndGet() { // arrange // Done in Test Init //Act testOutingRepo.AddOuting(outingToAdd); // assert Assert.IsTrue(testOutingRepo.GetAllOutings() != null); }