rewrite the setup of responses to use a standard helper function (#2177)

This commit is contained in:
Brendan Forster
2020-04-14 11:30:15 -03:00
committed by GitHub
parent 69d118230d
commit 287861e4a7
41 changed files with 390 additions and 448 deletions
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.Net;
using System.Reactive.Linq;
using System.Threading.Tasks;
using NSubstitute;
@@ -7,6 +8,8 @@ using Octokit.Internal;
using Octokit.Reactive;
using Xunit;
using static Octokit.Internal.TestSetup;
namespace Octokit.Tests.Reactive
{
public class ObservablePullRequestReviewCommentsClientTests
@@ -117,7 +120,7 @@ namespace Octokit.Tests.Reactive
);
var lastPageResponse = new ApiResponse<List<PullRequestReviewComment>>
(
new Response(),
CreateResponse(HttpStatusCode.OK),
new List<PullRequestReviewComment>
{
new PullRequestReviewComment(7)
@@ -172,7 +175,7 @@ namespace Octokit.Tests.Reactive
);
var lastPageResponse = new ApiResponse<List<PullRequestReviewComment>>
(
new Response(),
CreateResponse(HttpStatusCode.OK),
new List<PullRequestReviewComment>
{
new PullRequestReviewComment(7)
@@ -335,7 +338,7 @@ namespace Octokit.Tests.Reactive
});
var lastPageResponse = new ApiResponse<List<PullRequestReviewComment>>
(
new Response(),
CreateResponse(HttpStatusCode.OK),
new List<PullRequestReviewComment>
{
new PullRequestReviewComment(7),
@@ -419,7 +422,7 @@ namespace Octokit.Tests.Reactive
});
var lastPageResponse = new ApiResponse<List<PullRequestReviewComment>>
(
new Response(),
CreateResponse(HttpStatusCode.OK),
new List<PullRequestReviewComment>
{
new PullRequestReviewComment(7),
@@ -560,7 +563,7 @@ namespace Octokit.Tests.Reactive
});
var lastPageResponse = new ApiResponse<List<PullRequestReviewComment>>
(
new Response(),
CreateResponse(HttpStatusCode.OK),
new List<PullRequestReviewComment>
{
new PullRequestReviewComment(7),
@@ -632,7 +635,7 @@ namespace Octokit.Tests.Reactive
});
var lastPageResponse = new ApiResponse<List<PullRequestReviewComment>>
(
new Response(),
CreateResponse(HttpStatusCode.OK),
new List<PullRequestReviewComment>
{
new PullRequestReviewComment(7),