mirror of
https://github.com/zoriya/octokit.net.git
synced 2025-12-19 21:55:12 +00:00
fixing impacted observable client
This commit is contained in:
@@ -13,7 +13,7 @@ namespace Octokit.Reactive
|
||||
/// <param name="name">The name of the repository</param>
|
||||
/// <param name="number">The pull request number</param>
|
||||
/// <returns>The list of <see cref="PullRequestReviewComment"/>s for the specified pull request</returns>
|
||||
IObservable<PullRequestReviewComment> GetForPullRequest(string owner, string name, int number);
|
||||
IObservable<PullRequestReviewComment> GetAll(string owner, string name, int number);
|
||||
|
||||
/// <summary>
|
||||
/// Gets a list of the pull request review comments in a specified repository.
|
||||
|
||||
@@ -26,7 +26,7 @@ namespace Octokit.Reactive
|
||||
/// <param name="name">The name of the repository</param>
|
||||
/// <param name="number">The pull request number</param>
|
||||
/// <returns>The list of <see cref="PullRequestReviewComment"/>s for the specified pull request</returns>
|
||||
public IObservable<PullRequestReviewComment> GetForPullRequest(string owner, string name, int number)
|
||||
public IObservable<PullRequestReviewComment> GetAll(string owner, string name, int number)
|
||||
{
|
||||
Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
|
||||
Ensure.ArgumentNotNullOrEmptyString(name, "name");
|
||||
|
||||
@@ -66,7 +66,7 @@ namespace Octokit.Tests.Reactive
|
||||
|
||||
var client = new ObservablePullRequestReviewCommentsClient(gitHubClient);
|
||||
|
||||
var results = await client.GetForPullRequest("fakeOwner", "fakeRepoName", 7).ToArray();
|
||||
var results = await client.GetAll("fakeOwner", "fakeRepoName", 7).ToArray();
|
||||
|
||||
Assert.Equal(7, results.Length);
|
||||
gitHubClient.Connection.Received(1).Get<List<PullRequestReviewComment>>(firstPageUrl, null, null);
|
||||
@@ -80,12 +80,12 @@ namespace Octokit.Tests.Reactive
|
||||
var gitHubClient = Substitute.For<IGitHubClient>();
|
||||
var client = new ObservablePullRequestReviewCommentsClient(gitHubClient);
|
||||
|
||||
await AssertEx.Throws<ArgumentNullException>(async () => await client.GetForPullRequest(null, "name", 1));
|
||||
await AssertEx.Throws<ArgumentException>(async () => await client.GetForPullRequest("", "name", 1));
|
||||
await AssertEx.Throws<ArgumentNullException>(async () => await client.GetForPullRequest("owner", null, 1));
|
||||
await AssertEx.Throws<ArgumentException>(async () => await client.GetForPullRequest("owner", "", 1));
|
||||
await AssertEx.Throws<ArgumentNullException>(async () => await client.GetForPullRequest(null, null, 1));
|
||||
await AssertEx.Throws<ArgumentException>(async () => await client.GetForPullRequest("", "", 1));
|
||||
await AssertEx.Throws<ArgumentNullException>(async () => await client.GetAll(null, "name", 1));
|
||||
await AssertEx.Throws<ArgumentException>(async () => await client.GetAll("", "name", 1));
|
||||
await AssertEx.Throws<ArgumentNullException>(async () => await client.GetAll("owner", null, 1));
|
||||
await AssertEx.Throws<ArgumentException>(async () => await client.GetAll("owner", "", 1));
|
||||
await AssertEx.Throws<ArgumentNullException>(async () => await client.GetAll(null, null, 1));
|
||||
await AssertEx.Throws<ArgumentException>(async () => await client.GetAll("", "", 1));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user