Exemple #1
0
        TeamStats BuildTeamStatsFrom(Team teamRecord, IEnumerable<Team> teams)
        {
            var playerYearStats = PlayerYearStatsRepository.GetAllForYear(teamRecord.Year);
            var seasons = teams.OrderBy(x => x.Year).Select(team => team.Year);

            return new TeamStats(teamRecord, playerYearStats, seasons);
        }
Exemple #2
0
        public TeamStats(Team team, IEnumerable<PlayerYearStats> playerYearStats, IEnumerable<int> seasons)
        {
            Year = team.Year;
            Wins = team.Wins;
            Losses = team.Losses;
            Seasons = seasons;
            PlayerYearStats = playerYearStats;

            AddTotals();
        }
Exemple #3
0
        public void Setup()
        {
            _team = new Team
            {
                Year = 2012,
                Wins = 1,
                Losses = 1,
            };

            _seasons = new List<int> {2012, 2011};

            _playerYearStats = new List<PlayerYearStats>();
        }