Ejemplo n.º 1
0
        public void CreateProvider_CreateTournament_CreateTournamentCode_UpdateTournamentCode_Test()
        {
            var provider = api.CreateProvider(region, url);

            Assert.AreNotEqual(0, provider.Id);
            var tournament = api.CreateTournament(provider.Id, tournamentName);

            Assert.AreNotEqual(0, tournament.Id);
            var tmpTournamentCode = api.CreateTournamentCode(tournament.Id, 1, new List <long> {
                id, id2
            }, spectatorType,
                                                             pickType, mapType, string.Empty);

            Assert.AreNotEqual("", tmpTournamentCode);
            var tournamentCodes = api.CreateTournamentCodes(tournament.Id, 1, spectatorType, pickType, mapType,
                                                            string.Empty, 2);

            Assert.AreEqual(2, tournamentCodes.Count);

            var tournamentCodeDetails = api.GetTournamentCodeDetails(tmpTournamentCode);
            var success = api.UpdateTournamentCode(tmpTournamentCode, null, null, TournamentPickType.AllRandom,
                                                   TournamentMapType.HowlingAbyss);

            Assert.IsTrue(success);
            var tournamentCodeDetailsUpdated = api.GetTournamentCodeDetails(tmpTournamentCode);

            Assert.AreNotEqual(tournamentCodeDetails.PickType, tournamentCodeDetailsUpdated.PickType);
            Assert.AreNotEqual(tournamentCodeDetails.Map, tournamentCodeDetailsUpdated.Map);
        }
 public static bool UpdateTournamentCodePlayers(string code, List <long> allowedsummoners)
 {
     return(TournamentApi.UpdateTournamentCode(code, allowedsummoners, TournamentSpectatorType.All,
                                               TournamentPickType.TournamentDraft, TournamentMapType.SummonersRift));
 }