public void EnsuresNonNullArguments() { var gitHubClient = Substitute.For<IGitHubClient>(); var client = new ObservablePullRequestReviewCommentReactionsClient(gitHubClient); Assert.Throws<ArgumentNullException>(() => client.GetAll(null, "name", 1)); Assert.Throws<ArgumentNullException>(() => client.GetAll("owner", null, 1)); Assert.Throws<ArgumentException>(() => client.GetAll("", "name", 1)); Assert.Throws<ArgumentException>(() => client.GetAll("owner", "", 1)); }
public void RequestsCorrectUrlWithRepositoryId() { var gitHubClient = Substitute.For<IGitHubClient>(); var client = new ObservablePullRequestReviewCommentReactionsClient(gitHubClient); client.GetAll(1, 42); gitHubClient.Received().Reaction.PullRequestReviewComment.GetAll(1, 42); }