public async Task Test_GetUserGitHubRepo_InternalServerError()
        {
            var githubManager = new GitHubManager(_mockHttpHandler.Object);

            HttpResponseMessage message = new HttpResponseMessage();

            message.StatusCode = System.Net.HttpStatusCode.InternalServerError;

            var taskCompletion = new TaskCompletionSource <HttpResponseMessage>();

            taskCompletion.SetResult(message);
            _mockHttpHandler.Setup(n => n.GetAsync(It.IsAny <Uri>())).Returns(taskCompletion.Task);

            var result = await githubManager.GetUserGitHubRepo("SomePath", 1, 1);

            // Validate the result
            Assert.Null(result);
        }
        public async Task Test_GetUserGitHubRepo_Success()
        {
            var githubManager = new GitHubManager(_mockHttpHandler.Object);

            HttpResponseMessage message = new HttpResponseMessage();

            message.StatusCode = System.Net.HttpStatusCode.OK;

            message.Content = new StringContent(GetUserReposData());
            var taskCompletion = new TaskCompletionSource <HttpResponseMessage>();

            taskCompletion.SetResult(message);
            _mockHttpHandler.Setup(n => n.GetAsync(It.IsAny <Uri>())).Returns(taskCompletion.Task);

            var result = await githubManager.GetUserGitHubRepo("SomePath", 1, 1);

            // Validate the result
            Assert.NotNull(result);
            Assert.NotNull(result.Repos);
            Assert.Equal(result.Repos.Count, 1);
        }