public async Task Test_GetPullRequetsByRepoName_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.GetPullRequetsByRepoName("SomePath", "test");

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

            HttpResponseMessage message = new HttpResponseMessage();

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

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

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

            var result = await githubManager.GetPullRequetsByRepoName("SomePath", "test");

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