public TeamsControllerTest()
        {
            ITeamRepository memoryTeamRepository = new MemoryTeamRepository();

            memoryTeamRepository.AddTeam(new Team("one"));
            memoryTeamRepository.AddTeam(new Team("two"));

            _controller = new TeamsController(memoryTeamRepository);
        }
Example #2
0
        public ITeamRepository RepoWith5Teams()
        {
            ITeamRepository _memoryRepository = new MemoryTeamRepository();

            _memoryRepository.AddTeam(new Team()
            {
                Name    = "fake1",
                Id      = Guid.Parse(TEAM_1_ID),
                Members = new List <Member>()
                {
                    new Member(Guid.Parse(MEMBER_1_ID), "fake1", "fake1"),
                    new Member(Guid.Parse(MEMBER_2_ID), "fake2", "fake2")
                }
            });
            _memoryRepository.AddTeam(new Team()
            {
                Name    = "fake2",
                Id      = Guid.Parse(TEAM_2_ID),
                Members = new List <Member>()
                {
                    new Member(Guid.Parse(MEMBER_3_ID), "fake3", "fake3"),
                    new Member(Guid.Parse(MEMBER_4_ID), "fake4", "fake4")
                }
            });
            _memoryRepository.AddTeam(new Team()
            {
                Name    = "fake3",
                Id      = Guid.Parse(TEAM_3_ID),
                Members = new List <Member>()
                {
                    new Member(Guid.Parse(MEMBER_5_ID), "fake5", "fake5"),
                    new Member(Guid.Parse(MEMBER_6_ID), "fake6", "fake6")
                }
            });
            _memoryRepository.AddTeam(new Team()
            {
                Name    = "fake4",
                Id      = Guid.Parse(TEAM_4_ID),
                Members = new List <Member>()
                {
                    new Member(Guid.Parse(MEMBER_7_ID), "fake7", "fake7"),
                    new Member(Guid.Parse(MEMBER_8_ID), "fake8", "fake8")
                }
            });
            _memoryRepository.AddTeam(new Team()
            {
                Name    = "fake5",
                Id      = Guid.Parse(TEAM_5_ID),
                Members = new List <Member>()
                {
                    new Member(Guid.Parse(MEMBER_9_ID), "fake9", "fake9"),
                    new Member(Guid.Parse(MEMBER_10_ID), "fake10", "fake10")
                }
            });

            return(_memoryRepository);
        }