Exemplo n.º 1
0
        // View Dev Team By Name
        private void DisplayDevTeamByName()
        {
            // Display all team names
            DisplayDevTeams();
            Console.WriteLine("Enter the name of the team you would like to view");

            // Get user input
            string name = Console.ReadLine();

            // Get team by name
            DevTeam team = _teamsRepo.GetDevTeamByName(name);

            if (team == null)
            {
                Console.WriteLine("No team found by that name");
            }
            else if (team._developers.Count > 0)
            {
                foreach (Developer i in team._developers)
                {
                    Console.WriteLine(i.Name);
                }
            }
            else
            {
                Console.WriteLine("There are no developers on that team");
            }
        }
        public void AddTeamToList_ShouldGetNotNull()
        {
            //Arrange
            DevTeam devTeam = new DevTeam();

            devTeam.TeamName = "Panther";
            DevTeamRepo repository = new DevTeamRepo();

            //Act
            repository.AddDevTeamToList(devTeam);
            DevTeam fromDirectory = repository.GetDevTeamByName("Panther");

            //Assert
            Assert.IsNotNull(fromDirectory);
        }
Exemplo n.º 3
0
        private void DisplayTeamByName()
        {
            Console.Clear();

            Console.WriteLine("Please enter a Team Name: ");
            string      teamName = Console.ReadLine();
            DevTeamPOCO devTeam  = _devTeamRepo.GetDevTeamByName(teamName);

            if (devTeam != null)
            {
                Console.WriteLine($"Team Name: {devTeam.TeamName}\n" +
                                  $"Team ID: {devTeam.TeamID}");
            }
            else
            {
                Console.WriteLine("Sorry, Could not find a Team by that Name.");
            }
        }
Exemplo n.º 4
0
 private void AddDevToDevTeam(string teamName)
 {
     teamName = Console.ReadLine().ToLower();
     _devTeamRepo.GetDevTeamByName(teamName);
 }