public void EnsuresNonNullArguments() { var gitHubClient = Substitute.For <IGitHubClient>(); var client = new ObservablePullRequestReviewsClient(gitHubClient); Assert.Throws <ArgumentNullException>(() => client.Delete(null, "name", 1, 1)); Assert.Throws <ArgumentNullException>(() => client.Delete("owner", null, 1, 1)); Assert.Throws <ArgumentException>(() => client.Delete("", "name", 1, 1)); Assert.Throws <ArgumentException>(() => client.Delete("owner", "", 1, 1)); }
public void PostsToCorrectUrlWithRepositoryId() { var gitHubClient = Substitute.For <IGitHubClient>(); var client = new ObservablePullRequestReviewsClient(gitHubClient); client.Delete(1, 13, 13); gitHubClient.Received().PullRequest.Review.Delete(1, 13, 13); }
public void PostsToCorrectUrl() { var gitHubClient = Substitute.For <IGitHubClient>(); var client = new ObservablePullRequestReviewsClient(gitHubClient); client.Delete("owner", "name", 13, 13); gitHubClient.Received().PullRequest.Review.Delete("owner", "name", 13, 13); }