diff --git a/Octokit.Tests/Clients/ReferencesClientTests.cs b/Octokit.Tests/Clients/ReferencesClientTests.cs index e3fa820d6f..782004f659 100644 --- a/Octokit.Tests/Clients/ReferencesClientTests.cs +++ b/Octokit.Tests/Clients/ReferencesClientTests.cs @@ -68,6 +68,9 @@ public async Task EnsuresNonNullArguments() await Assert.ThrowsAsync(() => client.GetAll(null, "name")); await Assert.ThrowsAsync(() => client.GetAll("owner", null)); + + await Assert.ThrowsAsync(() => client.GetAll(null, "name", ApiOptions.None)); + await Assert.ThrowsAsync(() => client.GetAll("owner", null, ApiOptions.None)); await Assert.ThrowsAsync(() => client.GetAll("owner", "name", null)); await Assert.ThrowsAsync(() => client.GetAll(1, null)); @@ -75,6 +78,9 @@ public async Task EnsuresNonNullArguments() await Assert.ThrowsAsync(() => client.GetAll("", "name")); await Assert.ThrowsAsync(() => client.GetAll("owner", "")); + + await Assert.ThrowsAsync(() => client.GetAll("", "name", ApiOptions.None)); + await Assert.ThrowsAsync(() => client.GetAll("owner", "", ApiOptions.None)); } [Fact] @@ -110,16 +116,27 @@ public async Task EnsuresNonNullArguments() await Assert.ThrowsAsync(() => client.GetAllForSubNamespace(null, "name", "heads")); await Assert.ThrowsAsync(() => client.GetAllForSubNamespace("owner", null, "heads")); await Assert.ThrowsAsync(() => client.GetAllForSubNamespace("owner", "name", null)); + + await Assert.ThrowsAsync(() => client.GetAllForSubNamespace(null, "name", "heads", ApiOptions.None)); + await Assert.ThrowsAsync(() => client.GetAllForSubNamespace("owner", null, "heads", ApiOptions.None)); + await Assert.ThrowsAsync(() => client.GetAllForSubNamespace("owner", "name", null, ApiOptions.None)); await Assert.ThrowsAsync(() => client.GetAllForSubNamespace("owner", "name", "heads", null)); await Assert.ThrowsAsync(() => client.GetAllForSubNamespace(1, null)); + + await Assert.ThrowsAsync(() => client.GetAllForSubNamespace(1, null, ApiOptions.None)); await Assert.ThrowsAsync(() => client.GetAllForSubNamespace(1, "subnamespace", null)); await Assert.ThrowsAsync(() => client.GetAllForSubNamespace("", "name", "heads")); await Assert.ThrowsAsync(() => client.GetAllForSubNamespace("owner", "", "heads")); await Assert.ThrowsAsync(() => client.GetAllForSubNamespace("owner", "name", "")); + await Assert.ThrowsAsync(() => client.GetAllForSubNamespace("", "name", "heads", ApiOptions.None)); + await Assert.ThrowsAsync(() => client.GetAllForSubNamespace("owner", "", "heads", ApiOptions.None)); + await Assert.ThrowsAsync(() => client.GetAllForSubNamespace("owner", "name", "", ApiOptions.None)); + await Assert.ThrowsAsync(() => client.GetAllForSubNamespace(1, "")); + await Assert.ThrowsAsync(() => client.GetAllForSubNamespace(1, "", ApiOptions.None)); } [Fact]