diff --git a/Octokit.Tests/Clients/IssueCommentsClientTests.cs b/Octokit.Tests/Clients/IssueCommentsClientTests.cs index 629cf80f..2354e780 100644 --- a/Octokit.Tests/Clients/IssueCommentsClientTests.cs +++ b/Octokit.Tests/Clients/IssueCommentsClientTests.cs @@ -13,12 +13,12 @@ namespace Octokit.Tests.Clients public class TheGetMethod { [Fact] - public void RequestsCorrectUrl() + public async Task RequestsCorrectUrl() { var connection = Substitute.For(); var client = new IssueCommentsClient(connection); - client.Get("fake", "repo", 42); + await client.Get("fake", "repo", 42); connection.Received().Get( Arg.Is(u => u.ToString() == "repos/fake/repo/issues/comments/42"), @@ -26,14 +26,26 @@ namespace Octokit.Tests.Clients Arg.Is(s => s == "application/vnd.github.squirrel-girl-preview")); } + [Fact] + public async Task RequestsCorrectUrlWithRepositoryId() + { + var connection = Substitute.For(); + var client = new IssueCommentsClient(connection); + + await client.Get(1, 42); + + connection.Received().Get(Arg.Is(u => u.ToString() == "repositories/1/issues/comments/42")); + } + [Fact] public async Task EnsuresNonNullArguments() { var client = new IssueCommentsClient(Substitute.For()); await Assert.ThrowsAsync(() => client.Get(null, "name", 1)); - await Assert.ThrowsAsync(() => client.Get("", "name", 1)); await Assert.ThrowsAsync(() => client.Get("owner", null, 1)); + + await Assert.ThrowsAsync(() => client.Get("", "name", 1)); await Assert.ThrowsAsync(() => client.Get("owner", "", 1)); } } @@ -41,12 +53,12 @@ namespace Octokit.Tests.Clients public class TheGetForRepositoryMethod { [Fact] - public void RequestsCorrectUrl() + public async Task RequestsCorrectUrl() { var connection = Substitute.For(); var client = new IssueCommentsClient(connection); - client.GetAllForRepository("fake", "repo"); + await client.GetAllForRepository("fake", "repo"); connection.Received().GetAll( Arg.Is(u => u.ToString() == "repos/fake/repo/issues/comments"), @@ -56,7 +68,18 @@ namespace Octokit.Tests.Clients } [Fact] - public void RequestsCorrectUrlWithApiOptions() + public async Task RequestsCorrectUrlWithRepositoryId() + { + var connection = Substitute.For(); + var client = new IssueCommentsClient(connection); + + await client.GetAllForRepository(1); + + connection.Received().GetAll(Arg.Is(u => u.ToString() == "repositories/1/issues/comments"), Args.ApiOptions); + } + + [Fact] + public async Task RequestsCorrectUrlWithApiOptions() { var connection = Substitute.For(); var client = new IssueCommentsClient(connection); @@ -67,7 +90,8 @@ namespace Octokit.Tests.Clients PageSize = 1, StartPage = 1 }; - client.GetAllForRepository("fake", "repo", options); + + await client.GetAllForRepository("fake", "repo", options); connection.Received().GetAll( Arg.Is(u => u.ToString() == "repos/fake/repo/issues/comments"), @@ -77,16 +101,39 @@ namespace Octokit.Tests.Clients } [Fact] - public async Task EnsuresArgumentsNotNull() + public async Task RequestsCorrectUrlWithRepositoryIdWithApiOptions() + { + var connection = Substitute.For(); + var client = new IssueCommentsClient(connection); + + var options = new ApiOptions + { + PageCount = 1, + PageSize = 1, + StartPage = 1 + }; + + await client.GetAllForRepository(1, options); + + connection.Received().GetAll(Arg.Is(u => u.ToString() == "repositories/1/issues/comments"), options); + } + + [Fact] + public async Task EnsuresNonNullArguments() { var connection = Substitute.For(); var client = new IssueCommentsClient(connection); await Assert.ThrowsAsync(() => client.GetAllForRepository(null, "name")); - await Assert.ThrowsAsync(() => client.GetAllForRepository("", "name")); await Assert.ThrowsAsync(() => client.GetAllForRepository("owner", null)); - await Assert.ThrowsAsync(() => client.GetAllForRepository("owner", "")); + await Assert.ThrowsAsync(() => client.GetAllForRepository(null, "name", ApiOptions.None)); + await Assert.ThrowsAsync(() => client.GetAllForRepository("owner", null, ApiOptions.None)); await Assert.ThrowsAsync(() => client.GetAllForRepository("owner", "name", null)); + + await Assert.ThrowsAsync(() => client.GetAllForRepository(1, null)); + + await Assert.ThrowsAsync(() => client.GetAllForRepository("", "name")); + await Assert.ThrowsAsync(() => client.GetAllForRepository("owner", "")); await Assert.ThrowsAsync(() => client.GetAllForRepository("owner", "", ApiOptions.None)); await Assert.ThrowsAsync(() => client.GetAllForRepository("", "name", ApiOptions.None)); } @@ -95,12 +142,12 @@ namespace Octokit.Tests.Clients public class TheGetForIssueMethod { [Fact] - public void RequestsCorrectUrl() + public async Task RequestsCorrectUrl() { var connection = Substitute.For(); var client = new IssueCommentsClient(connection); - client.GetAllForIssue("fake", "repo", 3); + await client.GetAllForIssue("fake", "repo", 3); connection.Received().GetAll( Arg.Is(u => u.ToString() == "repos/fake/repo/issues/3/comments"), @@ -110,7 +157,18 @@ namespace Octokit.Tests.Clients } [Fact] - public void RequestsCorrectUrlWithApiOptions() + public async Task RequestsCorrectUrlWithRepositoryId() + { + var connection = Substitute.For(); + var client = new IssueCommentsClient(connection); + + await client.GetAllForIssue(1, 3); + + connection.Received().GetAll(Arg.Is(u => u.ToString() == "repositories/1/issues/3/comments"), Args.ApiOptions); + } + + [Fact] + public async Task RequestsCorrectUrlWithApiOptions() { var connection = Substitute.For(); var client = new IssueCommentsClient(connection); @@ -121,7 +179,8 @@ namespace Octokit.Tests.Clients PageSize = 1, PageCount = 1 }; - client.GetAllForIssue("fake", "repo", 3, options); + + await client.GetAllForIssue("fake", "repo", 3, options); connection.Received().GetAll( Arg.Is(u => u.ToString() == "repos/fake/repo/issues/3/comments"), @@ -131,16 +190,39 @@ namespace Octokit.Tests.Clients } [Fact] - public async Task EnsuresArgumentsNotNull() + public async Task RequestsCorrectUrlWithRepositoryIdWithApiOptions() + { + var connection = Substitute.For(); + var client = new IssueCommentsClient(connection); + + var options = new ApiOptions + { + StartPage = 1, + PageSize = 1, + PageCount = 1 + }; + + await client.GetAllForIssue(1, 3, options); + + connection.Received().GetAll(Arg.Is(u => u.ToString() == "repositories/1/issues/3/comments"), options); + } + + [Fact] + public async Task EnsuresNonNullArguments() { var connection = Substitute.For(); var client = new IssueCommentsClient(connection); await Assert.ThrowsAsync(() => client.GetAllForIssue(null, "name", 1)); - await Assert.ThrowsAsync(() => client.GetAllForIssue("", "name", 1)); await Assert.ThrowsAsync(() => client.GetAllForIssue("owner", null, 1)); - await Assert.ThrowsAsync(() => client.GetAllForIssue("owner", "", 1)); + await Assert.ThrowsAsync(() => client.GetAllForIssue(null, "name", 1, ApiOptions.None)); + await Assert.ThrowsAsync(() => client.GetAllForIssue("owner", null, 1, ApiOptions.None)); await Assert.ThrowsAsync(() => client.GetAllForIssue("owner", "name", 1, null)); + + await Assert.ThrowsAsync(() => client.GetAllForIssue(1, 1, null)); + + await Assert.ThrowsAsync(() => client.GetAllForIssue("", "name", 1)); + await Assert.ThrowsAsync(() => client.GetAllForIssue("owner", "", 1)); await Assert.ThrowsAsync(() => client.GetAllForIssue("", "name", 1, ApiOptions.None)); await Assert.ThrowsAsync(() => client.GetAllForIssue("owner", "", 1, ApiOptions.None)); } @@ -161,16 +243,31 @@ namespace Octokit.Tests.Clients } [Fact] - public async Task EnsuresArgumentsNotNull() + public void PostsToCorrectUrlWithRepositoryId() + { + const string newComment = "some title"; + var connection = Substitute.For(); + var client = new IssueCommentsClient(connection); + + client.Create(1, 1, newComment); + + connection.Received().Post(Arg.Is(u => u.ToString() == "repositories/1/issues/1/comments"), Arg.Any()); + } + + [Fact] + public async Task EnsuresNonNullArguments() { var connection = Substitute.For(); var client = new IssueCommentsClient(connection); - await Assert.ThrowsAsync(() => client.Create(null, "name", 1, "title")); - await Assert.ThrowsAsync(() => client.Create("", "name", 1, "x")); + await Assert.ThrowsAsync(() => client.Create(null, "name", 1, "x")); await Assert.ThrowsAsync(() => client.Create("owner", null, 1, "x")); - await Assert.ThrowsAsync(() => client.Create("owner", "", 1, "x")); await Assert.ThrowsAsync(() => client.Create("owner", "name", 1, null)); + + await Assert.ThrowsAsync(() => client.Create(1, 1, null)); + + await Assert.ThrowsAsync(() => client.Create("", "name", 1, "x")); + await Assert.ThrowsAsync(() => client.Create("owner", "", 1, "x")); } } @@ -189,16 +286,31 @@ namespace Octokit.Tests.Clients } [Fact] - public async Task EnsuresArgumentsNotNull() + public void PostsToCorrectUrlWithRepositoryId() + { + const string issueCommentUpdate = "Worthwhile update"; + var connection = Substitute.For(); + var client = new IssueCommentsClient(connection); + + client.Update(1, 42, issueCommentUpdate); + + connection.Received().Patch(Arg.Is(u => u.ToString() == "repositories/1/issues/comments/42"), Arg.Any()); + } + + [Fact] + public async Task EnsuresNonNullArguments() { var connection = Substitute.For(); var client = new IssueCommentsClient(connection); - await Assert.ThrowsAsync(() => client.Update(null, "name", 42, "title")); - await Assert.ThrowsAsync(() => client.Update("", "name", 42, "x")); + await Assert.ThrowsAsync(() => client.Update(null, "name", 42, "x")); await Assert.ThrowsAsync(() => client.Update("owner", null, 42, "x")); - await Assert.ThrowsAsync(() => client.Update("owner", "", 42, "x")); await Assert.ThrowsAsync(() => client.Update("owner", "name", 42, null)); + + await Assert.ThrowsAsync(() => client.Update(1, 42, null)); + + await Assert.ThrowsAsync(() => client.Update("", "name", 42, "x")); + await Assert.ThrowsAsync(() => client.Update("owner", "", 42, "x")); } } @@ -215,6 +327,17 @@ namespace Octokit.Tests.Clients connection.Received().Delete(Arg.Is(u => u.ToString() == "repos/fake/repo/issues/comments/42")); } + [Fact] + public void DeletesCorrectUrlWithRepositoryId() + { + var connection = Substitute.For(); + var client = new IssueCommentsClient(connection); + + client.Delete(1, 42); + + connection.Received().Delete(Arg.Is(u => u.ToString() == "repositories/1/issues/comments/42")); + } + [Fact] public async Task EnsuresArgumentsNotNullOrEmpty() { @@ -222,20 +345,21 @@ namespace Octokit.Tests.Clients var client = new IssueCommentsClient(connection); await Assert.ThrowsAsync(() => client.Delete(null, "name", 42)); - await Assert.ThrowsAsync(() => client.Delete("", "name", 42)); await Assert.ThrowsAsync(() => client.Delete("owner", null, 42)); + + await Assert.ThrowsAsync(() => client.Delete("", "name", 42)); await Assert.ThrowsAsync(() => client.Delete("owner", "", 42)); } } - public class TheCtor - { - [Fact] - public void EnsuresNonNullArguments() + public class TheCtor { - Assert.Throws(() => new IssueCommentsClient(null)); + [Fact] + public void EnsuresNonNullArguments() + { + Assert.Throws(() => new IssueCommentsClient(null)); + } } - } [Fact] public void CanDeserializeIssueComment() diff --git a/Octokit.Tests/Reactive/ObservableIssueCommentsClientTests.cs b/Octokit.Tests/Reactive/ObservableIssueCommentsClientTests.cs index 34dda0cd..524741de 100644 --- a/Octokit.Tests/Reactive/ObservableIssueCommentsClientTests.cs +++ b/Octokit.Tests/Reactive/ObservableIssueCommentsClientTests.cs @@ -1,6 +1,5 @@ using System; using System.Collections.Generic; -using System.Reactive.Threading.Tasks; using System.Threading.Tasks; using NSubstitute; using Octokit.Reactive; @@ -13,7 +12,7 @@ namespace Octokit.Tests.Reactive public class TheGetMethod { [Fact] - public void GetsFromClientIssueComment() + public void RequestsCorrectUrl() { var gitHubClient = Substitute.For(); var client = new ObservableIssueCommentsClient(gitHubClient); @@ -23,15 +22,27 @@ namespace Octokit.Tests.Reactive gitHubClient.Issue.Comment.Received().Get("fake", "repo", 42); } + [Fact] + public void RequestsCorrectUrlWithRepositoryId() + { + var gitHubClient = Substitute.For(); + var client = new ObservableIssueCommentsClient(gitHubClient); + + client.Get(1, 42); + + gitHubClient.Issue.Comment.Received().Get(1, 42); + } + [Fact] public async Task EnsuresNonNullArguments() { var client = new ObservableIssueCommentsClient(Substitute.For()); - await Assert.ThrowsAsync(() => client.Get(null, "name", 1).ToTask()); - await Assert.ThrowsAsync(() => client.Get("", "name", 1).ToTask()); - await Assert.ThrowsAsync(() => client.Get("owner", null, 1).ToTask()); - await Assert.ThrowsAsync(() => client.Get("owner", "", 1).ToTask()); + Assert.Throws(() => client.Get(null, "name", 1)); + Assert.Throws(() => client.Get("owner", null, 1)); + + Assert.Throws(() => client.Get("", "name", 1)); + Assert.Throws(() => client.Get("owner", "", 1)); } } @@ -51,18 +62,31 @@ namespace Octokit.Tests.Reactive "application/vnd.github.squirrel-girl-preview"); } + [Fact] + public void RequestsCorrectUrlWithRepositoryId() + { + var gitHubClient = Substitute.For(); + var client = new ObservableIssueCommentsClient(gitHubClient); + + client.GetAllForRepository(1); + + gitHubClient.Connection.Received(1).Get>( + new Uri("repositories/1/issues/comments", UriKind.Relative), Args.EmptyDictionary, null); + } + [Fact] public void RequestsCorrectUrlWithApiOptions() { var gitHubClient = Substitute.For(); var client = new ObservableIssueCommentsClient(gitHubClient); - var options=new ApiOptions + var options = new ApiOptions { StartPage = 1, PageSize = 1, PageCount = 1 }; + client.GetAllForRepository("fake", "repo", options); gitHubClient.Connection.Received(1).Get>( @@ -72,18 +96,42 @@ namespace Octokit.Tests.Reactive } [Fact] - public async Task EnsuresArgumentsNotNull() + public void RequestsCorrectUrlWithRepositoryIdWithApiOptions() { var gitHubClient = Substitute.For(); var client = new ObservableIssueCommentsClient(gitHubClient); - await Assert.ThrowsAsync(() => client.GetAllForRepository(null, "name").ToTask()); - await Assert.ThrowsAsync(() => client.GetAllForRepository("", "name").ToTask()); - await Assert.ThrowsAsync(() => client.GetAllForRepository("owner", null).ToTask()); - await Assert.ThrowsAsync(() => client.GetAllForRepository("owner", "").ToTask()); - await Assert.ThrowsAsync(() => client.GetAllForRepository("owner", "name", null).ToTask()); - await Assert.ThrowsAsync(() => client.GetAllForRepository("", "name", ApiOptions.None).ToTask()); - await Assert.ThrowsAsync(() => client.GetAllForRepository("owner", "", ApiOptions.None).ToTask()); + var options = new ApiOptions + { + StartPage = 1, + PageSize = 1, + PageCount = 1 + }; + + client.GetAllForRepository(1, options); + + gitHubClient.Connection.Received(1).Get>( + new Uri("repositories/1/issues/comments", UriKind.Relative), Arg.Is>(d => d.Count == 2), null); + } + + [Fact] + public async Task EnsuresNonNullArguments() + { + var gitHubClient = Substitute.For(); + var client = new ObservableIssueCommentsClient(gitHubClient); + + Assert.Throws(() => client.GetAllForRepository(null, "name")); + Assert.Throws(() => client.GetAllForRepository("owner", null)); + Assert.Throws(() => client.GetAllForRepository(null, "name", ApiOptions.None)); + Assert.Throws(() => client.GetAllForRepository("owner", null, ApiOptions.None)); + Assert.Throws(() => client.GetAllForRepository("owner", "name", null)); + + Assert.Throws(() => client.GetAllForRepository(1, null)); + + Assert.Throws(() => client.GetAllForRepository("", "name")); + Assert.Throws(() => client.GetAllForRepository("owner", "")); + Assert.Throws(() => client.GetAllForRepository("", "name", ApiOptions.None)); + Assert.Throws(() => client.GetAllForRepository("owner", "", ApiOptions.None)); } } @@ -103,39 +151,74 @@ namespace Octokit.Tests.Reactive "application/vnd.github.squirrel-girl-preview"); } + [Fact] + public void RequestsCorrectUrlWithRepositoryId() + { + var gitHubClient = Substitute.For(); + var client = new ObservableIssueCommentsClient(gitHubClient); + + client.GetAllForIssue(1, 3); + + gitHubClient.Connection.Received(1).Get>( + new Uri("repositories/1/issues/3/comments", UriKind.Relative), Args.EmptyDictionary, null); + } + [Fact] public void RequestsCorrectUrlWithApiOptions() { var gitHubClient = Substitute.For(); var client = new ObservableIssueCommentsClient(gitHubClient); - var options=new ApiOptions + var options = new ApiOptions { StartPage = 1, PageSize = 1, PageCount = 1 }; + client.GetAllForIssue("fake", "repo", 3, options); gitHubClient.Connection.Received(1).Get>( - new Uri("repos/fake/repo/issues/3/comments", UriKind.Relative), - Arg.Any>(), - "application/vnd.github.squirrel-girl-preview"); + new Uri("repos/fake/repo/issues/3/comments", UriKind.Relative), Arg.Is>(d => d.Count == 2), null); } [Fact] - public async Task EnsuresArgumentsNotNull() + public void RequestsCorrectUrlWithRepositoryIdWithApiOptions() { var gitHubClient = Substitute.For(); var client = new ObservableIssueCommentsClient(gitHubClient); - await Assert.ThrowsAsync(() => client.GetAllForIssue(null, "name", 1).ToTask()); - await Assert.ThrowsAsync(() => client.GetAllForIssue("", "name", 1).ToTask()); - await Assert.ThrowsAsync(() => client.GetAllForIssue("owner", null, 1).ToTask()); - await Assert.ThrowsAsync(() => client.GetAllForIssue("owner", "", 1).ToTask()); - await Assert.ThrowsAsync(() => client.GetAllForIssue("owner", "name", 1, null).ToTask()); - await Assert.ThrowsAsync(() => client.GetAllForIssue("", "name", 1, ApiOptions.None).ToTask()); - await Assert.ThrowsAsync(() => client.GetAllForIssue("owner", "", 1, ApiOptions.None).ToTask()); + var options = new ApiOptions + { + StartPage = 1, + PageSize = 1, + PageCount = 1 + }; + + client.GetAllForIssue(1, 3, options); + + gitHubClient.Connection.Received(1).Get>( + new Uri("repositories/1/issues/3/comments", UriKind.Relative), Arg.Is>(d => d.Count == 2), null); + } + + [Fact] + public async Task EnsuresNonNullArguments() + { + var gitHubClient = Substitute.For(); + var client = new ObservableIssueCommentsClient(gitHubClient); + + Assert.Throws(() => client.GetAllForIssue(null, "name", 1)); + Assert.Throws(() => client.GetAllForIssue("owner", null, 1)); + Assert.Throws(() => client.GetAllForIssue(null, "name", 1, ApiOptions.None)); + Assert.Throws(() => client.GetAllForIssue("owner", null, 1, ApiOptions.None)); + Assert.Throws(() => client.GetAllForIssue("owner", "name", 1, null)); + + Assert.Throws(() => client.GetAllForIssue(1, 1, null)); + + Assert.Throws(() => client.GetAllForIssue("", "name", 1)); + Assert.Throws(() => client.GetAllForIssue("owner", "", 1)); + Assert.Throws(() => client.GetAllForIssue("", "name", 1, ApiOptions.None)); + Assert.Throws(() => client.GetAllForIssue("owner", "", 1, ApiOptions.None)); } } @@ -154,16 +237,31 @@ namespace Octokit.Tests.Reactive } [Fact] - public async Task EnsuresArgumentsNotNull() + public void PostsToCorrectUrlWithRepositoryId() + { + const string newComment = "some title"; + var gitHubClient = Substitute.For(); + var client = new ObservableIssueCommentsClient(gitHubClient); + + client.Create(1, 1, newComment); + + gitHubClient.Issue.Comment.Received().Create(1, 1, newComment); + } + + [Fact] + public async Task EnsuresNonNullArguments() { var gitHubClient = Substitute.For(); var client = new ObservableIssueCommentsClient(gitHubClient); - await Assert.ThrowsAsync(() => client.Create(null, "name", 1, "title").ToTask()); - await Assert.ThrowsAsync(() => client.Create("", "name", 1, "x").ToTask()); - await Assert.ThrowsAsync(() => client.Create("owner", null, 1, "x").ToTask()); - await Assert.ThrowsAsync(() => client.Create("owner", "", 1, "x").ToTask()); - await Assert.ThrowsAsync(() => client.Create("owner", "name", 1, null).ToTask()); + Assert.Throws(() => client.Create(null, "name", 1, "x")); + Assert.Throws(() => client.Create("owner", null, 1, "x")); + Assert.Throws(() => client.Create("owner", "name", 1, null)); + + Assert.Throws(() => client.Create(1, 1, null)); + + Assert.Throws(() => client.Create("", "name", 1, "x")); + Assert.Throws(() => client.Create("owner", "", 1, "x")); } } @@ -182,16 +280,69 @@ namespace Octokit.Tests.Reactive } [Fact] - public async Task EnsuresArgumentsNotNull() + public void PostsToCorrectUrlWithRepositoryId() + { + const string issueCommentUpdate = "Worthwhile update"; + var gitHubClient = Substitute.For(); + var client = new ObservableIssueCommentsClient(gitHubClient); + + client.Update(1, 42, issueCommentUpdate); + + gitHubClient.Issue.Comment.Received().Update(1, 42, issueCommentUpdate); + } + + [Fact] + public async Task EnsuresNonNullArguments() { var gitHubClient = Substitute.For(); var client = new ObservableIssueCommentsClient(gitHubClient); - await Assert.ThrowsAsync(() => client.Update(null, "name", 42, "title").ToTask()); - await Assert.ThrowsAsync(() => client.Update("", "name", 42, "x").ToTask()); - await Assert.ThrowsAsync(() => client.Update("owner", null, 42, "x").ToTask()); - await Assert.ThrowsAsync(() => client.Update("owner", "", 42, "x").ToTask()); - await Assert.ThrowsAsync(() => client.Update("owner", "name", 42, null).ToTask()); + Assert.Throws(() => client.Update(null, "name", 42, "title")); + Assert.Throws(() => client.Update("owner", null, 42, "x")); + Assert.Throws(() => client.Update("owner", "name", 42, null)); + + Assert.Throws(() => client.Update(1, 42, null)); + + Assert.Throws(() => client.Update("", "name", 42, "x")); + Assert.Throws(() => client.Update("owner", "", 42, "x")); + } + } + + public class TheDeleteMethod + { + [Fact] + public void DeletesCorrectUrl() + { + var gitHubClient = Substitute.For(); + var client = new ObservableIssueCommentsClient(gitHubClient); + + client.Delete("fake", "repo", 42); + + gitHubClient.Issue.Comment.Received().Delete("fake", "repo", 42); + } + + [Fact] + public void DeletesCorrectUrlWithRepositoryId() + { + var gitHubClient = Substitute.For(); + var client = new ObservableIssueCommentsClient(gitHubClient); + + client.Delete(1, 42); + + gitHubClient.Issue.Comment.Received().Delete(1, 42); + } + + [Fact] + public async Task EnsuresArgumentsNotNullOrEmpty() + { + var gitHubClient = Substitute.For(); + var client = new ObservableIssueCommentsClient(gitHubClient); + + Assert.Throws(() => client.Delete(null, "name", 42)); + Assert.Throws(() => client.Delete("owner", null, 42)); + + Assert.Throws(() => client.Delete("", "name", 42)); + Assert.Throws(() => client.Delete("owner", "", 42)); } }