Beispiel #1
0
        public async Task GetStaticMasteriesAsyncTest_WithLocale()
        {
            IRiotClient client      = new RiotClient();
            var         masteryList = await client.GetStaticMasteriesAsync(Locale.en_SG);

            Assert.That(masteryList.Data.Count, Is.GreaterThan(0));
            Assert.That(masteryList.Type, Is.Not.Null.And.Not.Empty);
            Assert.That(masteryList.Version, Is.Not.Null.And.Not.Empty);

            var mastery = masteryList.Data["6131"];

            Assert.That(mastery.Name, Is.EqualTo("Vampirism"));
        }
Beispiel #2
0
        public async Task GetStaticMasteriesAsyncTest_WithSelectedFields()
        {
            IRiotClient client      = new RiotClient();
            var         masteryList = await client.GetStaticMasteriesAsync(tags : new[]
            {
                nameof(StaticMasteryList.Tree),
                nameof(StaticMastery.MasteryTree),
            });

            Assert.That(masteryList.Data.Count, Is.GreaterThan(0));
            Assert.That(masteryList.Tree, Is.Not.Null);

            Assert.That(masteryList.Data.Values.Any(m => m.MasteryTree != MastertyTreeType.Ferocity));
            Assert.That(masteryList.Data.Values.All(m => m.Ranks == 0));
        }
Beispiel #3
0
        public async Task GetStaticMasteriesAsyncTest()
        {
            IRiotClient client      = new RiotClient();
            var         masteryList = await client.GetStaticMasteriesAsync(tags : new[] { "all" });

            Assert.That(masteryList.Data.Count, Is.GreaterThan(0));
            Assert.That(masteryList.Tree, Is.Not.Null);
            Assert.That(masteryList.Type, Is.Not.Null.And.Not.Empty);
            Assert.That(masteryList.Version, Is.Not.Null.And.Not.Empty);

            var mastery = masteryList.Data.Values.First();

            Assert.That(mastery.Id, Is.GreaterThan(0));
            Assert.That(mastery.Description, Is.Not.Null.And.Not.Empty);
            Assert.That(mastery.Image, Is.Not.Null);
            Assert.That(masteryList.Data.Values.Any(m => m.MasteryTree == MastertyTreeType.Cunning));
            Assert.That(mastery.Name, Is.Not.Null.And.Not.Empty);
            // Season 6 does not have any masteries with prereqs.
            //Assert.That(masteryList.Data.Values.Any(m => m.Prereq > 0));
            Assert.That(mastery.Ranks, Is.GreaterThan(0));
            Assert.That(mastery.SanitizedDescription, Is.Not.Null.And.Not.Empty);
        }
Beispiel #4
0
        public async Task GetStaticMasteriesAsyncTest_WithSelectedFields()
        {
            IRiotClient client = new RiotClient();
            var masteryList = await client.GetStaticMasteriesAsync(masteryListData: new[] { "Tree", "MasteryTree" });

            Assert.That(masteryList.Data.Count, Is.GreaterThan(0));
            Assert.That(masteryList.Tree, Is.Not.Null);

            Assert.That(masteryList.Data.Values.Any(m => m.MasteryTree != MastertyTreeType.Ferocity));
            Assert.That(masteryList.Data.Values.All(m => m.Ranks == 0));
        }
Beispiel #5
0
        public async Task GetStaticMasteriesAsyncTest()
        {
            IRiotClient client = new RiotClient();
            var masteryList = await client.GetStaticMasteriesAsync(masteryListData: new[] { "all" });

            Assert.That(masteryList.Data.Count, Is.GreaterThan(0));
            Assert.That(masteryList.Tree, Is.Not.Null);
            Assert.That(masteryList.Type, Is.Not.Null.And.Not.Empty);
            Assert.That(masteryList.Version, Is.Not.Null.And.Not.Empty);

            var mastery = masteryList.Data.Values.First();
            Assert.That(mastery.Id, Is.GreaterThan(0));
            Assert.That(mastery.Description, Is.Not.Null.And.Not.Empty);
            Assert.That(mastery.Image, Is.Not.Null);
            Assert.That(masteryList.Data.Values.Any(m => m.MasteryTree == MastertyTreeType.Cunning));
            Assert.That(mastery.Name, Is.Not.Null.And.Not.Empty);
            // Season 6 does not have any masteries with prereqs.
            //Assert.That(masteryList.Data.Values.Any(m => m.Prereq > 0));
            Assert.That(mastery.Ranks, Is.GreaterThan(0));
            Assert.That(mastery.SanitizedDescription, Is.Not.Null.And.Not.Empty);
        }