Ejemplo n.º 1
0
        public void GivenBettersPlacesMatchBets(string tournamentName, Table table)
        {
            using (TournamentRepository tournamentRepository = CreateTournamentRepository())
            {
                tournamentRepository.Save();
                foreach (TableRow row in table.Rows)
                {
                    TestUtilities.ParseBetterMatchBetPlacements(row, out string betterName, out int roundIndex, out int groupIndex, out int matchIndex, out string playerName);

                    Tournament tournament = tournamentRepository.GetTournamentByName(tournamentName);
                    RoundBase  round      = tournament.Rounds[roundIndex];
                    GroupBase  group      = round.Groups[groupIndex];
                    Match      match      = group.Matches[matchIndex];

                    tournamentRepository.BetterPlacesMatchBetOnMatch(tournament.Id, match.Id, betterName, playerName);
                    tournamentRepository.Save();
                }
            }
        }