public void InvalidApiInterface_RequestFails()
        {
            var response = DotaApiClient.GetDotaTeamInfosByIdAsync(apiInterface: "IProDota")
                           .Result;

            SleepAfterSendingRequest();

            AssertRequestFailed(response);
            Assert.Null(response.Contents);
        }
        public void InvalidMethodVersion_RequestFails()
        {
            var response = DotaApiClient.GetDotaTeamInfosByIdAsync(version: "v1.3")
                           .Result;

            SleepAfterSendingRequest();

            AssertRequestFailed(response);
            Assert.Null(response.Contents);
        }
        public void GetDotaTeamInfosById_CountProvided_ReturnsCorrectAmount(
            uint count, int resultCount)
        {
            var response = DotaApiClient.GetDotaTeamInfosByIdAsync(count: count)
                           .Result;

            SleepAfterSendingRequest();

            AssertRequestWasSuccessful(response);
            Assert.NotNull(response.Contents);
            Assert.NotEmpty(response.Contents);
            Assert.Equal(resultCount, response.Contents.Count);
        }
        public async Task MethodGotCancelled_RequestFails()
        {
            CancellationTokenSource source = new CancellationTokenSource();

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

            // Cancel method
            source.Cancel();

            var response = await task;

            SleepAfterSendingRequest();

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