public void DefaultParams_ReturnsHeroStats()
        {
            var response = DotaApiClient.GetHeroStatsAsync()
                           .Result;

            SleepAfterSendingRequest();

            AssertRequestWasSuccessful(response);
            Assert.NotNull(response.Contents);
            Assert.All(response.Contents, stats =>
            {
                Assert.NotEmpty(stats.Value.Name);
                Assert.NotNull(stats.Value.Attributes);
                Assert.NotEmpty(stats.Value.LocalizedName);
                Assert.NotEmpty(stats.Value.PrimaryAttribute);
            });
        }
        public async Task MethodGotCancelled_RequestFails()
        {
            CancellationTokenSource source = new CancellationTokenSource();

            // Start task to be cancelled
            var task = Task.Run(async() =>
            {
                return(await DotaApiClient.GetHeroStatsAsync(cToken: source.Token));
            });

            // Cancel method
            source.Cancel();

            var response = await task;

            SleepAfterSendingRequest();

            AssertRequestWasCancelled(response);
            Assert.Null(response.Contents);
        }