Пример #1
0
        public static Team CreateProTeam(string title, string description, string site, IEnumerable<long> usersIds)
        {
            var proTeam = new Team() { Title = title, Description = description, Site = site, IsPersonal = false, IsPro = true };
            proTeam.TeamStatistics = new TeamStatistics();

            foreach (var userId in usersIds)
                proTeam.TeamUsers.Add(new TeamUser(userId, TeamUserAction.Join));

            return proTeam;
        }
Пример #2
0
        public static Team CreatePersonalTeam(string title, User user)
        {
            var personalTeam = new Team() { Title = title, IsPersonal = true, IsPro = false };

            personalTeam.TeamStatistics = new TeamStatistics();

            var teamUser = new TeamUser(user, TeamUserAction.Join);
            personalTeam.TeamUsers.Add(teamUser);

            return personalTeam;
        }
Пример #3
0
 private void SetupBattleAndUserAndTeam(out Battle battle, out Team team, out User user)
 {
     battle = _creator.CreateBattle();
     user = _creator.CreateUser();
     team = _creator.CreateTeam(user);
 }