From 01e99f384807e8ecf9434018ba4593caedfbb1e8 Mon Sep 17 00:00:00 2001 From: Louis Zanella Date: Mon, 16 Dec 2024 10:25:06 -0500 Subject: [PATCH] Run dotnet format --- NGitLab.Mock.Tests/GroupsMockTests.cs | 2 +- .../UsingVerify/RepositoryMockTests.cs | 2 +- NGitLab.Mock/Change.cs | 2 +- .../Clients/MergeRequestChangeClient.cs | 2 +- NGitLab.Mock/PipelineSchedule.cs | 2 +- NGitLab.Tests/AsyncApiValidation.cs | 2 +- NGitLab.Tests/PipelineTests.cs | 3 ++- NGitLab.Tests/RunnerTests.cs | 2 +- NGitLab/Models/JobScope.cs | 18 +++++++++--------- 9 files changed, 18 insertions(+), 17 deletions(-) diff --git a/NGitLab.Mock.Tests/GroupsMockTests.cs b/NGitLab.Mock.Tests/GroupsMockTests.cs index e76e8326..4a9028d2 100644 --- a/NGitLab.Mock.Tests/GroupsMockTests.cs +++ b/NGitLab.Mock.Tests/GroupsMockTests.cs @@ -349,7 +349,7 @@ public void Test_create_update_delete_group_hooks() var groupId = 1; using var server = new GitLabConfig() - .WithUser("user1", isAdmin: true) + .WithUser("user1", isAdmin: true) .WithGroup("group1", groupId) .BuildServer(); diff --git a/NGitLab.Mock.Tests/UsingVerify/RepositoryMockTests.cs b/NGitLab.Mock.Tests/UsingVerify/RepositoryMockTests.cs index 4dfa8937..26b0cac6 100644 --- a/NGitLab.Mock.Tests/UsingVerify/RepositoryMockTests.cs +++ b/NGitLab.Mock.Tests/UsingVerify/RepositoryMockTests.cs @@ -4,9 +4,9 @@ using NGitLab.Mock.Clients; using NGitLab.Mock.Config; using NUnit.Framework; +using static VerifyNUnit.Verifier; using RepositoryGetTreeOptions = NGitLab.Models.RepositoryGetTreeOptions; using Throws = NUnit.Framework.Throws; -using static VerifyNUnit.Verifier; namespace NGitLab.Mock.Tests.UsingVerify; diff --git a/NGitLab.Mock/Change.cs b/NGitLab.Mock/Change.cs index cecac488..8a8d9705 100644 --- a/NGitLab.Mock/Change.cs +++ b/NGitLab.Mock/Change.cs @@ -20,7 +20,7 @@ public class Change : GitLabObject public Models.Change ToChange() { - return new () + return new() { Diff = Diff, AMode = AMode, diff --git a/NGitLab.Mock/Clients/MergeRequestChangeClient.cs b/NGitLab.Mock/Clients/MergeRequestChangeClient.cs index 5fb0ab36..596044a8 100644 --- a/NGitLab.Mock/Clients/MergeRequestChangeClient.cs +++ b/NGitLab.Mock/Clients/MergeRequestChangeClient.cs @@ -3,7 +3,7 @@ namespace NGitLab.Mock.Clients; -internal sealed class MergeRequestChangeClient : ClientBase, IMergeRequestChangeClient +internal sealed class MergeRequestChangeClient : ClientBase, IMergeRequestChangeClient { private readonly long _projectId; private readonly long _mergeRequestIid; diff --git a/NGitLab.Mock/PipelineSchedule.cs b/NGitLab.Mock/PipelineSchedule.cs index 82914d21..d18c53ea 100644 --- a/NGitLab.Mock/PipelineSchedule.cs +++ b/NGitLab.Mock/PipelineSchedule.cs @@ -46,7 +46,7 @@ public PipelineScheduleBasic ToPipelineScheduleBasicClient() public Models.PipelineSchedule ToPipelineScheduleClient() => new() { - Id = Id, + Id = Id, Active = Active, CreatedAt = CreatedAt, Cron = Cron, diff --git a/NGitLab.Tests/AsyncApiValidation.cs b/NGitLab.Tests/AsyncApiValidation.cs index 5d4b2bcb..8552c020 100644 --- a/NGitLab.Tests/AsyncApiValidation.cs +++ b/NGitLab.Tests/AsyncApiValidation.cs @@ -34,7 +34,7 @@ public void ValidateAsyncMethodSignature() if (parameterInfo.ParameterType != typeof(CancellationToken)) { - Assert.Fail($"The last parameter of method '{method}' must be of type 'CancellationToken' and named 'cancellationToken'"); + Assert.Fail($"The last parameter of method '{method}' must be of type 'CancellationToken' and named 'cancellationToken'"); } if (!string.Equals(parameterInfo.Name, "cancellationToken", StringComparison.Ordinal)) diff --git a/NGitLab.Tests/PipelineTests.cs b/NGitLab.Tests/PipelineTests.cs index 04a7f6de..6aec99ee 100644 --- a/NGitLab.Tests/PipelineTests.cs +++ b/NGitLab.Tests/PipelineTests.cs @@ -89,7 +89,8 @@ public async Task Test_can_list_jobs_from_pipeline() var pipelineJobQuery = new PipelineJobQuery { - PipelineId = pipeline.Id, Scope = new[] { "success", "pending" }, + PipelineId = pipeline.Id, + Scope = new[] { "success", "pending" }, }; var allJobs = await GitLabTestContext.RetryUntilAsync(() => pipelineClient.GetJobsAsync(pipelineJobQuery).ToList(), p => p.Count != 0, TimeSpan.FromSeconds(120)); Assert.That(allJobs.Count != 0); diff --git a/NGitLab.Tests/RunnerTests.cs b/NGitLab.Tests/RunnerTests.cs index f428bc99..3a702305 100644 --- a/NGitLab.Tests/RunnerTests.cs +++ b/NGitLab.Tests/RunnerTests.cs @@ -132,6 +132,6 @@ private static RetryPolicy GetRetryPolicy() { return Policy .Handle(ex => ex.StatusCode is HttpStatusCode.Forbidden) - .WaitAndRetry(3, sleepDurationProvider: attempt => TimeSpan.FromSeconds(2 * attempt)); + .WaitAndRetry(3, sleepDurationProvider: attempt => TimeSpan.FromSeconds(2 * attempt)); } } diff --git a/NGitLab/Models/JobScope.cs b/NGitLab/Models/JobScope.cs index 1999e76b..057f9937 100644 --- a/NGitLab/Models/JobScope.cs +++ b/NGitLab/Models/JobScope.cs @@ -19,13 +19,13 @@ public enum JobScope [Flags] public enum JobScopeMask { - All = Created | Pending | Running | Failed | Success | Canceled | Skipped | Manual, - Created = 0x01, - Pending = 0x02, - Running = 0x04, - Failed = 0x08, - Success = 0x10, - Canceled = 0x20, - Skipped = 0x40, - Manual = 0x80, + All = Created | Pending | Running | Failed | Success | Canceled | Skipped | Manual, + Created = 0x01, + Pending = 0x02, + Running = 0x04, + Failed = 0x08, + Success = 0x10, + Canceled = 0x20, + Skipped = 0x40, + Manual = 0x80, }