private void DisplayCostOfOutingType() { Console.WriteLine("What is the outing type number?\n" + "1: Golf\n" + "2: Bowling\n" + "3: AmusementPark\n" + "4: Concert"); int outing = int.Parse(Console.ReadLine()); EventType eventType = (EventType)outing; Console.WriteLine($"The total of the event type {eventType} is {_outingRepo.SpecificEventCost(eventType)}"); Console.ReadLine(); }
public void SpecificTypeAllCost() { KomodoOutingRepository repoInfo = new KomodoOutingRepository(); KomodoOutings productInfo = new KomodoOutings(EventType.Bowling, 6, new DateTime(2019 / 1 / 25), 25.50m, 220m); KomodoOutings productInfo2 = new KomodoOutings(EventType.Bowling, 6, new DateTime(2019 / 1 / 25), 25.50m, 220m); repoInfo.EventCost(productInfo); repoInfo.EventCost(productInfo2); repoInfo.AddToEventList(productInfo); repoInfo.AddToEventList(productInfo2); repoInfo.SpecificEventCost(EventType.Bowling); var actual = repoInfo.AllEventCostList(); var expected = 746m; Assert.AreEqual(expected, actual); }