public Update ( long repositoryId, int number, PullRequestUpdate pullRequestUpdate ) : IObservable |
||
repositoryId | long | The Id of the repository |
number | int | The PullRequest number |
pullRequestUpdate | PullRequestUpdate | An |
return | IObservable |
public void UpdatesClientRepositoryPullRequest() { var pullRequestUpdate = new PullRequestUpdate(); var gitHubClient = Substitute.For<IGitHubClient>(); var client = new ObservablePullRequestsClient(gitHubClient); client.Update("fake", "repo", 42, pullRequestUpdate); gitHubClient.Repository.PullRequest.Received().Update("fake", "repo", 42, pullRequestUpdate); }
public async Task EnsuresNonNullArguments() { var gitHubClient = Substitute.For<IGitHubClient>(); var client = new ObservablePullRequestsClient(gitHubClient); Assert.Throws<ArgumentNullException>(() => client.Update(null, "name", 42, new PullRequestUpdate())); Assert.Throws<ArgumentNullException>(() => client.Update("owner", null, 42, new PullRequestUpdate())); Assert.Throws<ArgumentNullException>(() => client.Update("owner", "name", 42, null)); Assert.Throws<ArgumentNullException>(() => client.Update(1, 42, null)); Assert.Throws<ArgumentException>(() => client.Update("", "name", 42, new PullRequestUpdate())); Assert.Throws<ArgumentException>(() => client.Update("owner", "", 42, new PullRequestUpdate())); }