public void CostOfAllOutings() { double totalOutings = outingRepo.CostOfAllOuting(); Console.WriteLine("$" + totalOutings); Console.WriteLine(" "); Console.WriteLine("Cost of all outings displayed above. Press Enter to return to return to Main Menu"); Console.ReadLine(); Console.Clear(); RunMenu(); }
public void CostOfAllOutings_Test() { //Arrange Outing newOuting1 = new Outing(EventType.AmusementPark, 18, 5.00d, 90.00d, new DateTime(2019, 9, 7)); Outing newOuting2 = new Outing(EventType.Bowling, 12, 8.00d, 96.00d, new DateTime(2019, 8, 5)); Outing newOuting3 = new Outing(EventType.Golf, 10, 12.00d, 120.00d, new DateTime(2019, 10, 27)); outingRepo.AddOuting(newOuting1); outingRepo.AddOuting(newOuting2); outingRepo.AddOuting(newOuting3); //Act List <Outing> testList = outingRepo.ReturnOutingList(); double costOfAllOutings = outingRepo.CostOfAllOuting(); double actual = costOfAllOutings; double expected = 306.00d; //Assert Assert.AreEqual(expected, actual); }