public static async Task <List <LeagueEntry> > GetLeagues(RiotClient api, Summoner summoner, Server server) { if (summoner != null) { List <LeagueEntry> list = await api.GetLeagueEntriesBySummonerIdAsync(summoner.Id, server.ToString()).ConfigureAwait(false); return(list); } return(null); }
public async Task GetLeagueEntriesBySummonerIdAsync() { IRiotClient client = new RiotClient(); List <LeagueEntry> leagueEntries = await client.GetLeagueEntriesBySummonerIdAsync(encryptedSummonerId); Assert.That(leagueEntries, Is.Not.Null); var leagueEntry = leagueEntries.First(); Assert.That(leagueEntry.LeagueId, Is.Not.Null.And.Not.Empty); Assert.That(leagueEntry.QueueType, Is.Not.Null.And.Not.Empty); Assert.That(leagueEntry.Tier, Is.Not.EqualTo(Tier.CHALLENGER)); Assert.That(leagueEntry.Rank, Is.Not.Null.And.Not.Empty); }