fixing impacted observable client

This commit is contained in:
Brendan Forster
2014-07-11 09:45:20 +09:30
parent 001c5ac564
commit fe4e7cceec
3 changed files with 9 additions and 9 deletions

View File

@@ -13,7 +13,7 @@ namespace Octokit.Reactive
/// <param name="name">The name of the repository</param> /// <param name="name">The name of the repository</param>
/// <param name="number">The pull request number</param> /// <param name="number">The pull request number</param>
/// <returns>The list of <see cref="PullRequestReviewComment"/>s for the specified pull request</returns> /// <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> /// <summary>
/// Gets a list of the pull request review comments in a specified repository. /// Gets a list of the pull request review comments in a specified repository.

View File

@@ -26,7 +26,7 @@ namespace Octokit.Reactive
/// <param name="name">The name of the repository</param> /// <param name="name">The name of the repository</param>
/// <param name="number">The pull request number</param> /// <param name="number">The pull request number</param>
/// <returns>The list of <see cref="PullRequestReviewComment"/>s for the specified pull request</returns> /// <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(owner, "owner");
Ensure.ArgumentNotNullOrEmptyString(name, "name"); Ensure.ArgumentNotNullOrEmptyString(name, "name");

View File

@@ -66,7 +66,7 @@ namespace Octokit.Tests.Reactive
var client = new ObservablePullRequestReviewCommentsClient(gitHubClient); 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); Assert.Equal(7, results.Length);
gitHubClient.Connection.Received(1).Get<List<PullRequestReviewComment>>(firstPageUrl, null, null); gitHubClient.Connection.Received(1).Get<List<PullRequestReviewComment>>(firstPageUrl, null, null);
@@ -80,12 +80,12 @@ namespace Octokit.Tests.Reactive
var gitHubClient = Substitute.For<IGitHubClient>(); var gitHubClient = Substitute.For<IGitHubClient>();
var client = new ObservablePullRequestReviewCommentsClient(gitHubClient); var client = new ObservablePullRequestReviewCommentsClient(gitHubClient);
await AssertEx.Throws<ArgumentNullException>(async () => await client.GetForPullRequest(null, "name", 1)); await AssertEx.Throws<ArgumentNullException>(async () => await client.GetAll(null, "name", 1));
await AssertEx.Throws<ArgumentException>(async () => await client.GetForPullRequest("", "name", 1)); await AssertEx.Throws<ArgumentException>(async () => await client.GetAll("", "name", 1));
await AssertEx.Throws<ArgumentNullException>(async () => await client.GetForPullRequest("owner", null, 1)); await AssertEx.Throws<ArgumentNullException>(async () => await client.GetAll("owner", null, 1));
await AssertEx.Throws<ArgumentException>(async () => await client.GetForPullRequest("owner", "", 1)); await AssertEx.Throws<ArgumentException>(async () => await client.GetAll("owner", "", 1));
await AssertEx.Throws<ArgumentNullException>(async () => await client.GetForPullRequest(null, null, 1)); await AssertEx.Throws<ArgumentNullException>(async () => await client.GetAll(null, null, 1));
await AssertEx.Throws<ArgumentException>(async () => await client.GetForPullRequest("", "", 1)); await AssertEx.Throws<ArgumentException>(async () => await client.GetAll("", "", 1));
} }
} }