<commit_before>﻿using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Newtonsoft.Json;
using NUnit.Framework;
using RiotNet.Models;
using RiotNet.Tests.Properties;

namespace RiotNet.Tests
{
    [TestFixture]
    public class ChampionTests
    {
        [Test]
        public async Task GetChampionsTaskAsyncTest()
        {
            var client = new RiotClient();
            var champions = await client.GetChampionsTaskAsync();

            Assert.That(champions, Is.Not.Null);
            Assert.That(champions.Count, Is.GreaterThan(100));
        }

        [Test]
        public async Task GetChampionsTaskAsyncTest_FreeToPlay()
        {
            var client = new RiotClient();
            // TODO: add freeToPlay parameter to this call once that parameter exists
            var champions = await client.GetChampionsTaskAsync();

            Assert.That(champions, Is.Not.Null);
            Assert.That(champions.Count, Is.LessThan(20));
        }

        [Test]
        public async Task GetChampionByIdTaskAsyncTest()
        {
            var client = new RiotClient();
            var champions = await client.GetChampionByIdTaskAsync(50);

            Assert.That(champions, Is.Not.Null.And.Not.Empty);
        }

        [Test]
        public void DeserializeChampionTest()
        {
            var champion = JsonConvert.DeserializeObject<Champion>(Resources.SampleChampion, RiotClient.JsonSettings);

            Assert.That(champion.Active);
            Assert.That(champion.BotEnabled);
            Assert.That(champion.BotMmEnabled);
            Assert.That(champion.FreeToPlay);
            Assert.That(champion.Id, Is.GreaterThan(0));
            Assert.That(champion.RankedPlayEnabled);
        }
    }
}<commit_msg>Fixed champion test.<commit_after>﻿using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Newtonsoft.Json;
using NUnit.Framework;
using RiotNet.Models;
using RiotNet.Tests.Properties;

namespace RiotNet.Tests
{
    [TestFixture]
    public class ChampionTests
    {
        [Test]
        public async Task GetChampionsTaskAsyncTest()
        {
            var client = new RiotClient();
            var champions = await client.GetChampionsTaskAsync();

            Assert.That(champions, Is.Not.Null);
            Assert.That(champions.Count, Is.GreaterThan(100));
        }

        [Test]
        public async Task GetChampionsTaskAsyncTest_FreeToPlay()
        {
            var client = new RiotClient();
            // TODO: add freeToPlay parameter to this call once that parameter exists
            var champions = await client.GetChampionsTaskAsync();

            Assert.That(champions, Is.Not.Null);
            Assert.That(champions.Count, Is.LessThan(20));
        }

        [Test]
        public async Task GetChampionByIdTaskAsyncTest()
        {
            var client = new RiotClient();
            var champion = await client.GetChampionByIdTaskAsync(103);

            Assert.That(champion, Is.Not.Null);
            Assert.That(champion.Id, Is.EqualTo(103));
        }

        [Test]
        public void DeserializeChampionTest()
        {
            var champion = JsonConvert.DeserializeObject<Champion>(Resources.SampleChampion, RiotClient.JsonSettings);

            Assert.That(champion.Active);
            Assert.That(champion.BotEnabled);
            Assert.That(champion.BotMmEnabled);
            Assert.That(champion.FreeToPlay);
            Assert.That(champion.Id, Is.GreaterThan(0));
            Assert.That(champion.RankedPlayEnabled);
        }
    }
}
{'fraction_non_alphanumeric': 0.09474854126146151, 'fraction_numerical': 0.005557099194220617, 'mean_word_length': 2.260869565217391, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7634139', 'n_tokens_mistral': 993, 'n_tokens_neox': 991, 'n_words': 194}