diff --git a/Octokit.Tests/Clients/CheckSuitesClientTests.cs b/Octokit.Tests/Clients/CheckSuitesClientTests.cs index 558610a28d..194c70fcc7 100644 --- a/Octokit.Tests/Clients/CheckSuitesClientTests.cs +++ b/Octokit.Tests/Clients/CheckSuitesClientTests.cs @@ -332,70 +332,6 @@ public async Task EnsuresNonEmptyArguments() } } -#pragma warning disable CS0618 // Type or member is obsolete - public class TheRequestMethod - { - [Fact] - public async Task RequestsCorrectUrl() - { - var connection = MockedIApiConnection.PostReturnsHttpStatus(HttpStatusCode.Created); - var client = new CheckSuitesClient(connection); - - var request = new CheckSuiteTriggerRequest("123abc"); - - await client.Request("fake", "repo", request); - - connection.Connection.Received().Post( - Arg.Is(u => u.ToString() == "repos/fake/repo/check-suite-requests"), - request, - "application/vnd.github.antiope-preview+json"); - } - - [Fact] - public async Task RequestsCorrectUrlWithRepositoryId() - { - var connection = MockedIApiConnection.PostReturnsHttpStatus(HttpStatusCode.Created); - var client = new CheckSuitesClient(connection); - - var request = new CheckSuiteTriggerRequest("123abc"); - - await client.Request(1, request); - - connection.Connection.Received().Post( - Arg.Is(u => u.ToString() == "repositories/1/check-suite-requests"), - request, - "application/vnd.github.antiope-preview+json"); - } - - [Fact] - public async Task EnsuresNonNullArguments() - { - var connection = Substitute.For(); - var client = new CheckSuitesClient(connection); - - var request = new CheckSuiteTriggerRequest("123abc"); - - await Assert.ThrowsAsync(() => client.Request(null, "repo", request)); - await Assert.ThrowsAsync(() => client.Request("fake", null, request)); - await Assert.ThrowsAsync(() => client.Request("fake", "repo", null)); - - await Assert.ThrowsAsync(() => client.Request(1, null)); - } - - [Fact] - public async Task EnsuresNonEmptyArguments() - { - var connection = Substitute.For(); - var client = new CheckSuitesClient(connection); - - var request = new CheckSuiteTriggerRequest("123abc"); - - await Assert.ThrowsAsync(() => client.Request("", "repo", request)); - await Assert.ThrowsAsync(() => client.Request("fake", "", request)); - } - } -#pragma warning restore CS0618 // Type or member is obsolete - public class TheRerequestMethod { [Fact] @@ -447,4 +383,4 @@ public async Task EnsuresNonEmptyArguments() } } } -} \ No newline at end of file +} diff --git a/Octokit.Tests/Reactive/ObservableCheckSuitesClientTests.cs b/Octokit.Tests/Reactive/ObservableCheckSuitesClientTests.cs index 7cbd5e2425..8e7024c25b 100644 --- a/Octokit.Tests/Reactive/ObservableCheckSuitesClientTests.cs +++ b/Octokit.Tests/Reactive/ObservableCheckSuitesClientTests.cs @@ -313,64 +313,6 @@ public async Task EnsuresNonEmptyArguments() } } -#pragma warning disable CS0618 // Type or member is obsolete - public class TheRequestMethod - { - [Fact] - public async Task RequestsCorrectUrl() - { - var gitHubClient = Substitute.For(); - var client = new ObservableCheckSuitesClient(gitHubClient); - - var request = new CheckSuiteTriggerRequest("123abc"); - - client.Request("fake", "repo", request); - - gitHubClient.Check.Suite.Received().Request("fake", "repo", request); - } - - [Fact] - public async Task RequestsCorrectUrlWithRepositoryId() - { - var gitHubClient = Substitute.For(); - var client = new ObservableCheckSuitesClient(gitHubClient); - - var request = new CheckSuiteTriggerRequest("123abc"); - - client.Request(1, request); - - gitHubClient.Check.Suite.Received().Request(1, request); - } - - [Fact] - public async Task EnsuresNonNullArguments() - { - var gitHubClient = Substitute.For(); - var client = new ObservableCheckSuitesClient(gitHubClient); - - var request = new CheckSuiteTriggerRequest("123abc"); - - Assert.Throws(() => client.Request(null, "repo", request)); - Assert.Throws(() => client.Request("fake", null, request)); - Assert.Throws(() => client.Request("fake", "repo", null)); - - Assert.Throws(() => client.Request(1, null)); - } - - [Fact] - public async Task EnsuresNonEmptyArguments() - { - var gitHubClient = Substitute.For(); - var client = new ObservableCheckSuitesClient(gitHubClient); - - var request = new CheckSuiteTriggerRequest("123abc"); - - Assert.Throws(() => client.Request("", "repo", request)); - Assert.Throws(() => client.Request("fake", "", request)); - } - } -#pragma warning restore CS0618 // Type or member is obsolete - public class TheRerequestMethod { [Fact]