public void CreateNewOuting_ShouldGetCorrectBool() { //Arrange Outings newOuting = new Outings(); OutingsRepo repo = new OutingsRepo(); //Act bool createOuting = repo.CreateNewOuting(newOuting); //Assert Assert.IsTrue(createOuting); }
public void ViewAllOutings_ShouldReturnCorrectBool() { //Arrange Outings newOuting = new Outings(); OutingsRepo repo = new OutingsRepo(); repo.CreateNewOuting(newOuting); //Act List <Outings> contents = repo.ViewAllOutings(); bool directoryHasContent = contents.Contains(newOuting); //Assert Assert.IsTrue(directoryHasContent); }
//Add New Outing private void CreateNewOuting() { Console.Clear(); Outings newOuting = new Outings(); //Event Type - ENUM Console.WriteLine("Select the type of event:\n\n" + "1. Golf \n" + "2. Bowling \n" + "3. Amusement Park\n" + "4. Concert"); string eventTypeAsString = Console.ReadLine(); switch (eventTypeAsString) { case "1": newOuting.TypeOfEvent = EventType.Golf; break; case "2": newOuting.TypeOfEvent = EventType.Bowling; break; case "3": newOuting.TypeOfEvent = EventType.Amusement_Park; break; case "4": newOuting.TypeOfEvent = EventType.Concert; break; } //Date of Event Console.WriteLine("Enter the date of the Event (YYYY,MM,DD):"); var eventDate = Console.ReadLine(); newOuting.EventDate = DateTime.Parse(eventDate); //Attendance of Event Console.WriteLine("Enter the number of people that attended:"); string attendanceAsString = Console.ReadLine(); newOuting.PeopleAttended = int.Parse(attendanceAsString); //Cost Per Person Console.WriteLine("Amount per person to attend event: "); string costPPAsString = Console.ReadLine(); newOuting.CostPerPerson = double.Parse(costPPAsString); _outingsRepo.CreateNewOuting(newOuting); }