public void GetDirectory_ShouldReturnCorrectCollection() { //Arrange Bowling content = new Bowling(); Bowling repo = new Bowling(); repo.AddContentToDirectory(content); //Act List <Bowling> contents = repo.GetContents(); bool directoryHasContent = contents.Contains(content); //Assert Assert.IsTrue(directoryHasContent); }
private void ShowAllContent() { bool continueToRun = true; while (continueToRun) { Console.Clear(); Console.WriteLine("Enter the number of the option you'd like to select:\n" + "1. Show Bowling Events\n" + "2. Show Concert Events\n" + "3. Show Golf Events\n" + "4. Show Amusement Park Events\n" + "5. Exit"); string input = Console.ReadLine(); switch (input) { case "1": Console.Clear(); List <Bowling> listOfContentBowling = _bowlingRepo.GetContents(); foreach (Bowling content in listOfContentBowling) { DisplayContent(content); Console.WriteLine("----------------------------------------"); } Console.WriteLine("This is all bowling events."); Console.WriteLine("Press any key to continue"); Console.ReadKey(); break; case "2": Console.Clear(); List <Concerts> listOfContentConcerts = _concertsRepo.GetContents(); foreach (Concerts content in listOfContentConcerts) { DisplayContent(content); Console.WriteLine("----------------------------------------"); } Console.WriteLine("This is all concert events."); Console.WriteLine("Press any key to continue"); Console.ReadKey(); break; case "3": Console.Clear(); List <Golf> listOfContentGolf = _golfRepo.GetContents(); foreach (Golf content in listOfContentGolf) { DisplayContent(content); Console.WriteLine("----------------------------------------"); } Console.WriteLine("This is all golf events."); Console.WriteLine("Press any key to continue"); Console.ReadKey(); break; case "4": Console.Clear(); List <AmusementParks> listOfContentAmusement = _amusementRepo.GetContents(); foreach (AmusementParks content in listOfContentAmusement) { DisplayContent(content); Console.WriteLine("----------------------------------------"); } Console.WriteLine("This is all amusement park events."); Console.WriteLine("Press any key to continue"); Console.ReadKey(); break; case "5": continueToRun = false; break; default: Console.WriteLine("Please choose a valid option"); Console.ReadKey(); break; } } }