public static Tuple <TournamentProvider, Tournament> GenerateTournament() { var provider = TournamentApi.CreateProvider(Region.euw, "http://lolcognac.nl/Match/Callback"); var tournament = TournamentApi.CreateTournament(provider.Id, "LCN 2017"); return(new Tuple <TournamentProvider, Tournament>(provider, tournament)); }
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); }