public void AddToList_ShouldGetNull() { //Arrange DevTeam content = new DevTeam(); content.TeamId = 3; DevTeam_Repository repository = new DevTeam_Repository(); //Act repository.AddTeamToList(content); DevTeam contentFromDirectory = repository.GetTeamByDevTeamId(3); //Assert Assert.IsNotNull(contentFromDirectory); }
//View list of Dev Teams by ID private void DisplayDevTeamsbyId() { Console.WriteLine("Enter the the number of the Dev Team you with to view (ie: 1, 2, 3...."); string teamIdAsString = Console.ReadLine(); int teamIdAsInt = int.Parse(teamIdAsString); DevTeam team = _contentDevTeamRepo.GetTeamByDevTeamId(teamIdAsInt); if (team != null) { Console.WriteLine($"Team Name:{team.TeamName}, Team ID: {team.TeamId}, Team Members: {team.TeamMembers.Count}"); } else { Console.WriteLine("No Team was found with that Team ID."); } }