コード例 #1
0
        public static string GetTournamentCode(List <long> allowedSummoners)
        {
            var tc = TournamentApi.CreateTournamentCode(TournamentId, 5, allowedSummoners, TournamentSpectatorType.All,
                                                        TournamentPickType.TournamentDraft, TournamentMapType.SummonersRift, string.Empty);

            return(tc);
        }
コード例 #2
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);
        }