private void AddOuting() { OutingContent newOuting = new OutingContent(); Console.Clear(); Console.WriteLine("Enter Event Type:\n" + "1. Amusement Park\n" + "2. Bowling\n" + "3. Concert\n" + "4. Golf"); string typeAsString = Console.ReadLine(); int typeAsInt = int.Parse(typeAsString); newOuting.EventType = (Events)typeAsInt; Console.WriteLine("How many people attended the event? (enter number)"); newOuting.AttendanceNumber = int.Parse(Console.ReadLine()); Console.WriteLine("Enter date of event: (ex. 01/01/2020"); newOuting.DateOfEvent = DateTime.Parse(Console.ReadLine()); Console.WriteLine("What is the cost per person? ex. 99.99"); newOuting.CostPerPerson = double.Parse(Console.ReadLine()); _repo.AddNewOuting(newOuting); }
public void AddOuting() { //arrange Outing Styx = new Outing(EventType.Concert, 80, new DateTime(2019, 11, 27), 50, 4000); //act _repo.AddNewOuting(Styx); int count = _repo.GetList().Count; //assert Assert.AreEqual(1, count); }
public void Seed() { Outing briarWood = new Outing("Briar Wood", EventType.Golf, 11, new DateTime(2020, 01, 01), 10d, 1000d); Outing beaconHills = new Outing("Beacon Hills", EventType.Golf, 22, new DateTime(2020, 02, 02), 20d, 2000d); Outing thunderBirdBowling = new Outing("Thunder Bird Lanes", EventType.Bowling, 33, new DateTime(2020, 03, 03), 30d, 3000d); Outing caseysLanes = new Outing("Caseys Lanes", EventType.Bowling, 44, new DateTime(2020, 04, 04), 40d, 4000d); Outing sixFlags = new Outing("Six Flags", EventType.AmusementPark, 55, new DateTime(2020, 05, 05), 50d, 5000d); Outing cedarPoint = new Outing("Cedar Point", EventType.AmusementPark, 66, new DateTime(2020, 06, 06), 60d, 6000d); Outing brockHampton = new Outing("Brockhampton", EventType.Concert, 77, new DateTime(2020, 07, 07), 70d, 7000d); Outing toto = new Outing("Toto", EventType.Concert, 88, new DateTime(2020, 08, 08), 80d, 8000d); _outingRepo.AddNewOuting(briarWood); _outingRepo.AddNewOuting(beaconHills); _outingRepo.AddNewOuting(thunderBirdBowling); _outingRepo.AddNewOuting(caseysLanes); _outingRepo.AddNewOuting(sixFlags); _outingRepo.AddNewOuting(cedarPoint); _outingRepo.AddNewOuting(brockHampton); _outingRepo.AddNewOuting(toto); }
public void AddNewOuting() { Console.Clear(); Outing newOuting = new Outing(); Console.WriteLine("Enter Event Type Number:\n" + "1.Golf\n" + "2.Bowling\n" + "3.Amusement Park\n" + "4.Concert"); string eventTypeAsString = Console.ReadLine(); int eventTypeAsInt = int.Parse(eventTypeAsString); newOuting.OutingType = (EventType)eventTypeAsInt; Console.WriteLine("Enter Attendance:"); string attendanceAsString = Console.ReadLine(); newOuting.OutingAttendance = int.Parse(attendanceAsString); Console.WriteLine("Enter Date of Outing (YYYY, MM, DD):"); string dateAsString = Console.ReadLine(); DateTime enteredDate = DateTime.Parse(dateAsString); newOuting.OutingDate = enteredDate; Console.WriteLine("Enter Cost Per Person:"); string costAsString = Console.ReadLine(); newOuting.CostPerPerson = double.Parse(costAsString); Console.WriteLine("Enter Total Outing Cost:"); string totalCostAsString = Console.ReadLine(); newOuting.TotalOutingCost = double.Parse(totalCostAsString); _outingRepo.AddNewOuting(newOuting); }