コード例 #1
0
        public void CreateTeamsAndSetPlayersTeamId_TestInparam1_5_Invalid()
        {
            List <List <Player> > listOfPlayerLists = new List <List <Player> >();

            for (int i = 0; i < TeamFactory.NumberOfPlayerListsRequired + 1; i++)
            {
                listOfPlayerLists.Add(PlayerFactory.CreateListOfPlayerLists(PlayerFactory.MaxPlayersRequired, PlayerFactory.MinPlayerNameStartValue));
            }
            List <Team> teamList = TeamFactory.CreateTeamsAndSetPlayersTeamId(listOfPlayerLists, TeamFactory.MinTeamNameStartValue);
        }
コード例 #2
0
        public void CreateTeamsAndSetPlayersTeamId_TestIfOutputIsNotNull()
        {
            List <List <Player> > listOfPlayerLists = new List <List <Player> >();

            for (int i = 0; i < TeamFactory.NumberOfPlayerListsRequired; i++)
            {
                listOfPlayerLists.Add(PlayerFactory.CreateListOfPlayerLists(PlayerFactory.MinPlayersRequired, PlayerFactory.MinPlayerNameStartValue));
            }
            Assert.IsNotNull(TeamFactory.CreateTeamsAndSetPlayersTeamId(listOfPlayerLists, TeamFactory.MinTeamNameStartValue));
        }
コード例 #3
0
        public void CreateTeamsAndSetPlayersTeamId_TestInparam1_1_Valid()
        {
            List <List <Player> > listOfPlayerLists = new List <List <Player> >();

            for (int i = 0; i < TeamFactory.NumberOfPlayerListsRequired; i++)
            {
                listOfPlayerLists.Add(PlayerFactory.CreateListOfPlayerLists(PlayerFactory.MinPlayersRequired, PlayerFactory.MinPlayerNameStartValue));
            }
            List <Team> teamList = TeamFactory.CreateTeamsAndSetPlayersTeamId(listOfPlayerLists, TeamFactory.MinTeamNameStartValue);

            Assert.AreEqual(TeamFactory.NumberOfPlayerListsRequired, teamList.Count);
        }
コード例 #4
0
        public void CreateTeamsAndSetPlayersTeamId_TestInparam2_1_Valid()
        {
            int teamNumber = TeamFactory.MinTeamNameStartValue;
            List <List <Player> > listOfPlayerLists = new List <List <Player> >();

            for (int i = 0; i < TeamFactory.NumberOfPlayerListsRequired; i++)
            {
                listOfPlayerLists.Add(PlayerFactory.CreateListOfPlayerLists(PlayerFactory.MinPlayersRequired, PlayerFactory.MinPlayerNameStartValue));
            }
            List <Team> teamList = TeamFactory.CreateTeamsAndSetPlayersTeamId(listOfPlayerLists, TeamFactory.MinTeamNameStartValue);

            for (int i = 0; i < teamList.Count; i++)
            {
                Assert.AreEqual($"Team-{teamNumber}", teamList[i].Name.Value);
                Assert.AreEqual($"Team-{teamNumber}'s Arena", teamList[i].HomeArena.Value);
                teamNumber++;
            }
        }
コード例 #5
0
 public void CreateTeamsAndSetPlayersTeamId_TestInparam1_1_Invalid()
 {
     List <Team> teamList = TeamFactory.CreateTeamsAndSetPlayersTeamId(null, TeamFactory.MinTeamNameStartValue);
 }