public void EnsuresNonNullArguments() { var connection = Substitute.For<IApiConnection>(); var client = new RepositoryCommentsClient(connection); Assert.ThrowsAsync<ArgumentNullException>(() => client.Create(null, "name", "sha", new NewCommitComment("body"))); Assert.ThrowsAsync<ArgumentNullException>(() => client.Create("owner", null, "sha", new NewCommitComment("body"))); Assert.ThrowsAsync<ArgumentNullException>(() => client.Create("owner", "name", null, new NewCommitComment("body"))); Assert.ThrowsAsync<ArgumentNullException>(() => client.Create("owner", "name", "sha", null)); Assert.ThrowsAsync<ArgumentNullException>(() => client.Create(1, null, new NewCommitComment("body"))); Assert.ThrowsAsync<ArgumentNullException>(() => client.Create(1, "sha", null)); Assert.ThrowsAsync<ArgumentException>(() => client.Create("", "name", "sha", new NewCommitComment("body"))); Assert.ThrowsAsync<ArgumentException>(() => client.Create("owner", "", "sha", new NewCommitComment("body"))); Assert.ThrowsAsync<ArgumentException>(() => client.Create("owner", "name", "", new NewCommitComment("body"))); Assert.ThrowsAsync<ArgumentException>(() => client.Create(1, "", new NewCommitComment("body"))); }