public async Task GetChampionMasteryAsyncTest() { IRiotClient client = new RiotClient(); var championMastery = await client.GetChampionMasteryAsync(34172230L, 412L); // Thresh Assert.That(championMastery, Is.Not.Null); Assert.That(championMastery.ChampionId, Is.EqualTo(412L)); Assert.That(championMastery.LastPlayTime.Kind, Is.EqualTo(DateTimeKind.Utc)); Assert.That(championMastery.LastPlayTime, Is.GreaterThan(new DateTime(2015, 1, 1, 0, 0, 0, DateTimeKind.Utc)).And.LessThanOrEqualTo(DateTime.UtcNow)); Assert.That(championMastery.ChampionLevel, Is.AtLeast(1), "Invalid champion level."); Assert.That(championMastery.ChampionPoints, Is.AtLeast(1), "Invalid number of champion points."); Assert.That(championMastery.PlayerId, Is.EqualTo(34172230L)); }
public async Task GetChampionMasteryAsyncTest() { IRiotClient client = new RiotClient(); var championMastery = await client.GetChampionMasteryAsync(34172230L, 412L); // Thresh Assert.That(championMastery, Is.Not.Null); Assert.That(championMastery.ChampionId, Is.EqualTo(412L)); Assert.That(championMastery.LastPlayTime.Kind, Is.EqualTo(DateTimeKind.Utc)); Assert.That(championMastery.LastPlayTime, Is.GreaterThan(new DateTime(2015, 1, 1, 0, 0, 0, DateTimeKind.Utc)).And.LessThanOrEqualTo(DateTime.UtcNow)); Assert.That(championMastery.ChampionLevel, Is.AtLeast(1), "Invalid champion level."); Assert.That(championMastery.ChampionPoints, Is.AtLeast(1), "Invalid number of champion points."); Assert.That(championMastery.PlayerId, Is.EqualTo(34172230L)); }
public async Task GetChampionMasteryAsyncTest() { IRiotClient client = new RiotClient(); var championMastery = await client.GetChampionMasteryAsync(encryptedSummonerId, 412L); // Thresh Assert.That(championMastery, Is.Not.Null); Assert.That(championMastery.ChampionId, Is.EqualTo(412L)); Assert.That(championMastery.LastPlayTime.Kind, Is.EqualTo(DateTimeKind.Utc)); Assert.That(championMastery.LastPlayTime, Is.GreaterThan(new DateTime(2015, 1, 1, 0, 0, 0, DateTimeKind.Utc)).And.LessThanOrEqualTo(DateTime.UtcNow)); Assert.That(championMastery.ChampionLevel, Is.AtLeast(1), "Invalid champion level."); Assert.That(championMastery.ChampionPoints, Is.AtLeast(1), "Invalid number of champion points."); // Riot is returning wrong data for no known reason. It returns the summoner id encrypted in a different way than the other endpoints. Check this when v4 is totally active and v3 deprectated //Assert.That(championMastery.SummonerId, Is.EqualTo(EncryptedSummonerId)); }