public void EnsuresNonNullArgumentsOrEmpty() { var githubClient = Substitute.For <IGitHubClient>(); var client = new ObservableRepositoryCommentsClient(githubClient); Assert.Throws <ArgumentNullException>(() => client.Delete(null, "name", 42)); Assert.Throws <ArgumentNullException>(() => client.Delete("owner", null, 42)); Assert.Throws <ArgumentException>(() => client.Delete("", "name", 42)); Assert.Throws <ArgumentException>(() => client.Delete("owner", "", 42)); }
public void DeletesCorrectUrlWithRepositoryId() { var githubClient = Substitute.For <IGitHubClient>(); var client = new ObservableRepositoryCommentsClient(githubClient); client.Delete(1, 42); githubClient.Repository.Comment.Received().Delete(1, 42); }