diff --git a/Octokit.Tests/Clients/ReactionsClientTests.cs b/Octokit.Tests/Clients/ReactionsClientTests.cs index bfe37b3b..5f838c8b 100644 --- a/Octokit.Tests/Clients/ReactionsClientTests.cs +++ b/Octokit.Tests/Clients/ReactionsClientTests.cs @@ -32,6 +32,7 @@ public class ReactionsClientTests await Assert.ThrowsAsync(() => client.CommitComments.CreateReaction("", "name", 1, new NewReaction(ReactionType.Heart))); await Assert.ThrowsAsync(() => client.CommitComments.CreateReaction("owner", null, 1, new NewReaction(ReactionType.Heart))); await Assert.ThrowsAsync(() => client.CommitComments.CreateReaction("owner", "", 1, new NewReaction(ReactionType.Heart))); + await Assert.ThrowsAsync(() => client.CommitComments.CreateReaction("owner", "name", 1, null)); } } diff --git a/Octokit.Tests/Reactive/ObservableReactionsClientTests.cs b/Octokit.Tests/Reactive/ObservableReactionsClientTests.cs index ebaf6b2f..845d7bc1 100644 --- a/Octokit.Tests/Reactive/ObservableReactionsClientTests.cs +++ b/Octokit.Tests/Reactive/ObservableReactionsClientTests.cs @@ -31,12 +31,13 @@ namespace Octokit.Tests.Reactive Assert.Throws(() => client.CommitComments.CreateReaction("", "name", 1, new NewReaction(ReactionType.Heart))); Assert.Throws(() => client.CommitComments.CreateReaction("owner", null, 1, new NewReaction(ReactionType.Heart))); Assert.Throws(() => client.CommitComments.CreateReaction("owner", "", 1, new NewReaction(ReactionType.Heart))); + Assert.Throws(() => client.CommitComments.CreateReaction("owner", "name", 1, null)); } } - + public class TheCreateMethod { - [Fact] + [Fact] public void RequestsCorrectUrl() { var githubClient = Substitute.For(); @@ -45,18 +46,6 @@ namespace Octokit.Tests.Reactive client.CommitComments.CreateReaction("fake", "repo", 1, newReaction); githubClient.Received().Reaction.CommitComments.CreateReaction("fake", "repo", 1, newReaction); - } - - [Fact] - public void EnsuresArgumentsNotNull() - { - var githubClient = Substitute.For(); - var client = new ObservableReactionsClient(githubClient); - - Assert.Throws(() => client.CommitComments.CreateReaction(null, "name", 1, new NewReaction(ReactionType.Heart))); - Assert.Throws(() => client.CommitComments.CreateReaction("", "name", 1, new NewReaction(ReactionType.Heart))); - Assert.Throws(() => client.CommitComments.CreateReaction("owner", null, 1, new NewReaction(ReactionType.Heart))); - Assert.Throws(() => client.CommitComments.CreateReaction("owner", "", 1, new NewReaction(ReactionType.Heart))); } } }