Exemplo n.º 1
0
        //Create new Dev Team

        private void CreateNewDevTeam()
        {
            List <Developer> devTeamMembers = new List <Developer>();

            DevTeam newDevTeam = new DevTeam();

            //Name of DevTeam
            Console.WriteLine("Enter the name of the Dev Team.");
            newDevTeam.TeamName = Console.ReadLine();

            //DevTeam Id
            Console.WriteLine("Enter the DevTeam ID.");

            newDevTeam.TeamId      = int.Parse(Console.ReadLine());
            newDevTeam.TeamMembers = devTeamMembers;
            _contentDevTeamRepo.AddTeamToList(newDevTeam);
        }
        public void Arrange()
        {
            Developer        johnSmith = new Developer("John Smith", 123, true, 1);
            Developer        joanJett  = new Developer("Joan Jett", 553, true, 1);
            List <Developer> teamOne   = new List <Developer>();

            teamOne.Add(johnSmith);
            teamOne.Add(joanJett);

            _repo    = new DevTeam_Repository();
            _content = new DevTeam("Code Magenta", 2, teamOne);

            _repo.AddTeamToList(_content);
        }
        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);
        }