public void TotalCostSpecificOutings() { bool continueToRun = true; while (continueToRun) { Console.WriteLine("\nEnter which type of outings you would like to see the cost of: \n" + "1. Golf\n" + "2. Bowling\n" + "3. Amusement Park\n" + "4. Concert\n" + "5. Exit\n"); string userInput = Console.ReadLine(); int userChoice = int.Parse(userInput); switch (userChoice) { case 1: decimal totalGolf = _outingRepo.CombinedTypeCostGolf(); Console.WriteLine($"The total cost for golf is: {totalGolf}"); break; case 2: decimal totalBowling = _outingRepo.CombinedTypeCostBowling(); Console.WriteLine($"The total cost for bowling is: {totalBowling}"); break; case 3: decimal totalPark = _outingRepo.CombinedTypeCostAmusementParks(); Console.WriteLine($"The total cost for Amusement Parks is: {totalPark}"); break; case 4: decimal totalConcert = _outingRepo.CombinedTypeCostConcert(); Console.WriteLine($"The total cost for concerts is: {totalConcert}"); break; case 5: continueToRun = false; break; } Console.WriteLine("\nPlease hit any key to continue... "); Console.ReadKey(); } }
public void CombinedCostConcertTest() { OutingRepo outingRepo = new OutingRepo(); OutingContent content = new OutingContent(); content.CostForEvent = 100m; content.Type = OutingType.Concert; OutingContent contentOne = new OutingContent(); contentOne.CostForEvent = 100m; contentOne.Type = OutingType.Concert; outingRepo.AddToList(content); outingRepo.AddToList(contentOne); decimal expected = 200m; decimal actual = outingRepo.CombinedTypeCostConcert(); Assert.AreEqual(expected, actual); }