From cd1835326baf1a9099f7d1c9a3d2e3e316417fe7 Mon Sep 17 00:00:00 2001 From: Tom Longhurst <30480171+thomhurst@users.noreply.github.com> Date: Mon, 15 Apr 2024 21:19:26 +0100 Subject: [PATCH] Fix xUnit Warnings (#2906) * Fix xUnit Warnings * Fix * Fix formatting in AsyncPaginationExtensionGenerator.cs --------- Co-authored-by: Keegan Campbell --- .../AsyncPaginationExtensionsGenerator.cs | 34 ++++--- .../Clients/CheckRunsClientTests.cs | 4 +- .../CommitCommentReactionsClientTests.cs | 16 ++-- .../Clients/CommitStatusClientTests.cs | 20 ++-- .../Clients/DeploymentStatusClientTests.cs | 4 +- .../Enterprise/EnterpriseLdapClientTests.cs | 4 +- ...rprisePreReceiveEnvironmentsClientTests.cs | 4 +- .../EnterprisePreReceiveHooksClientTests.cs | 4 +- .../Clients/EventsClientTests.cs | 2 +- .../Clients/GitHubClientTests.cs | 6 +- .../IssueCommentReactionsClientTests.cs | 16 ++-- .../Clients/IssueReactionsClientTests.cs | 16 ++-- .../Clients/IssueTimelineClientTests.cs | 14 +-- .../Clients/IssuesClientTests.cs | 50 +++++----- .../Clients/IssuesEventsClientTests.cs | 12 +-- .../Clients/IssuesLabelsClientTests.cs | 56 +++++------ .../Clients/MigrationsClientTests.cs | 10 +- .../Clients/MilestonesClientTests.cs | 12 +-- .../Clients/OrganizationClientTests.cs | 2 +- .../Clients/OrganizationHooksClientTests.cs | 2 +- .../Clients/OrganizationMembersClientTests.cs | 16 ++-- ...nizationOutsideCollaboratorsClientTests.cs | 18 ++-- .../Clients/OrganizationSecretsClientTests.cs | 4 +- .../Clients/ProjectCardsClientTests.cs | 8 +- .../Clients/ProjectColumnsClientTests.cs | 4 +- .../Clients/ProjectsClientTests.cs | 12 +-- ...equestReviewCommentReactionsClientTests.cs | 16 ++-- .../PullRequestReviewCommentsClientTests.cs | 12 +-- .../Clients/PullRequestReviewsClientTests.cs | 16 ++-- .../Clients/PullRequestsClientTests.cs | 46 ++++----- .../Clients/ReleasesClientTests.cs | 16 ++-- .../Clients/RepositoryBranchesClientTests.cs | 78 +++++++-------- .../RepositoryCollaboratorClientTests.cs | 22 ++--- .../Clients/RepositoryCommitsClientTests.cs | 14 +-- .../Clients/RepositoryContentsClientTests.cs | 8 +- .../RepositoryDeployKeysClientTests.cs | 22 ++--- .../Clients/RepositoryForksClientTests.cs | 16 ++-- .../Clients/RepositoryHooksClientTests.cs | 4 +- .../RepositoryInvitationsClientTests.cs | 10 +- .../Clients/RespositorySecretsClientTests.cs | 4 +- .../Clients/StarredClientTests.cs | 96 +++++++++---------- .../Clients/StatisticsClientTests.cs | 8 +- .../Clients/TeamsClientTests.cs | 16 ++-- .../Clients/TreeClientTests.cs | 4 +- .../ObservableEnterpriseLdapClientTests.cs | 4 +- ...rprisePreReceiveEnvironmentsClientTests.cs | 4 +- ...bleEnterprisePreReceiveHooksClientTests.cs | 4 +- .../ObservableCheckRunsClientTests.cs | 4 +- .../ObservableFollowersClientTests.cs | 8 +- .../ObservableIssueTimelineClientTests.cs | 14 +-- ...bservableOrganizationMembersClientTests.cs | 6 +- ...nizationOutsideCollaboratorsClientTests.cs | 18 ++-- ...bservableOrganizationSecretsClientTests.cs | 4 +- .../ObservableProjectCardsClientTests.cs | 8 +- .../ObservableProjectColumnsClientTests.cs | 4 +- .../Reactive/ObservableProjectsClientTests.cs | 12 +-- ...ObservableRepositoryBranchesClientTests.cs | 32 +++---- ...rvableRepositoryCollaboratorClientTests.cs | 10 +- ...servableRepositoryDeployKeysClientTests.cs | 4 +- .../ObservableRepositoryHooksClientTests.cs | 2 +- .../ObservableRepositorySecretsClientTests.cs | 2 +- .../Reactive/ObservableTeamsClientTests.cs | 12 +-- Octokit.Tests/Clients/EventsClientTests.cs | 30 +++--- .../Clients/RepositoryContentsClientTests.cs | 16 ++-- .../Clients/StatisticsClientTests.cs | 16 ++-- Octokit.Tests/Exceptions/ApiErrorTests.cs | 2 +- Octokit.Tests/Http/ApiConnectionTests.cs | 2 +- Octokit.Tests/Http/ApiInfoParserTests.cs | 2 +- Octokit.Tests/Http/ApiInfoTests.cs | 8 +- Octokit.Tests/Http/ConnectionTests.cs | 2 +- Octokit.Tests/Models/DeploymentStatusTests.cs | 2 +- Octokit.Tests/Models/InstallationTests.cs | 5 +- Octokit.Tests/Models/MigrationTests.cs | 4 +- .../Models/PullRequestCommitTests.cs | 6 +- .../Models/RequestParametersTests.cs | 18 ++-- .../SearchIssuesRequestExclusionsTests.cs | 2 +- .../Models/SearchIssuesRequestTests.cs | 4 +- .../Models/WorkflowJobsResponseTests.cs | 2 +- Octokit.Tests/Models/WorkflowRunUsageTests.cs | 2 +- .../ObservableIssueTimelineClientTests.cs | 8 +- .../ObservableIssuesEventsClientTests.cs | 16 ++-- .../ObservablePullRequestsClientTests.cs | 8 +- ...ObservableRepositoryContentsClientTests.cs | 16 ++-- 83 files changed, 543 insertions(+), 538 deletions(-) diff --git a/Octokit.Generators/AsyncPaginationExtensionsGenerator.cs b/Octokit.Generators/AsyncPaginationExtensionsGenerator.cs index d3621f047f..8407388fda 100644 --- a/Octokit.Generators/AsyncPaginationExtensionsGenerator.cs +++ b/Octokit.Generators/AsyncPaginationExtensionsGenerator.cs @@ -26,8 +26,8 @@ namespace Octokit.Generators class AsyncPaginationExtensionsGenerator { - private const string HEADER = ( -@"using System; + private const string HEADER = ( + @"using System; using System.Collections.Generic; namespace Octokit.AsyncPaginationExtension @@ -44,8 +44,8 @@ public static class Extensions private const int DEFAULT_PAGE_SIZE = 30; "); - private const string FOOTER = ( -@" + private const string FOOTER = ( + @" } }"); @@ -63,15 +63,17 @@ public static async Task GenerateAsync(string root = "./") var enumOptions = new EnumerationOptions { RecurseSubdirectories = true }; var paginatedCallRegex = new Regex(@".*Task\w+)>>\s*(?\w+)(?