From e895fe8beb196158f22cc099d4a2e445fd548c3f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 18 Dec 2023 14:47:26 +0000 Subject: [PATCH] Bump csharpier from 0.26.5 to 0.26.7 (#200) * Bump csharpier from 0.26.5 to 0.26.7 Bumps [csharpier](https://github.com/belav/csharpier) from 0.26.5 to 0.26.7. - [Release notes](https://github.com/belav/csharpier/releases) - [Changelog](https://github.com/belav/csharpier/blob/main/CHANGELOG.md) - [Commits](https://github.com/belav/csharpier/compare/0.26.5...0.26.7) --- updated-dependencies: - dependency-name: csharpier dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] * CSharpier format --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Guilherme Branco Stracini Co-authored-by: gstraccini[bot] <44061807+gstraccini[bot]@users.noreply.github.com> --- .config/dotnet-tools.json | 2 +- Src/VTEX/VTEXContext.cs | 15 ++++++------- Src/VTEX/VTEXWrapper.cs | 21 +++++++------------ .../Health/VtexHealthClientTests.cs | 3 +-- 4 files changed, 18 insertions(+), 23 deletions(-) diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json index 3cfb466c3..9e8f2784c 100644 --- a/.config/dotnet-tools.json +++ b/.config/dotnet-tools.json @@ -3,7 +3,7 @@ "isRoot": true, "tools": { "csharpier": { - "version": "0.26.5", + "version": "0.26.7", "commands": [ "dotnet-csharpier" ] diff --git a/Src/VTEX/VTEXContext.cs b/Src/VTEX/VTEXContext.cs index 4518ba5b4..1b63e07f3 100644 --- a/Src/VTEX/VTEXContext.cs +++ b/Src/VTEX/VTEXContext.cs @@ -264,9 +264,10 @@ private Order GetOrderInternal(string orderId) } else if ( transaction.TransactionId != null - && !transaction - .TransactionId - .Equals(@"NO-PAYMENT", StringComparison.InvariantCultureIgnoreCase) + && !transaction.TransactionId.Equals( + @"NO-PAYMENT", + StringComparison.InvariantCultureIgnoreCase + ) ) { LogConsumer.Info(@"Bank bill {0}", order.Sequence); @@ -297,10 +298,10 @@ private Order GetOrderInternal(string orderId) } if ( - order - .ClientProfileData - .Email - .IndexOf(@"ct.vtex", StringComparison.InvariantCultureIgnoreCase) != -1 + order.ClientProfileData.Email.IndexOf( + @"ct.vtex", + StringComparison.InvariantCultureIgnoreCase + ) != -1 ) { order.ClientProfileData.Email = @"pedido@editorainovacao.com.br"; diff --git a/Src/VTEX/VTEXWrapper.cs b/Src/VTEX/VTEXWrapper.cs index 91cca5da4..f67e37bd3 100644 --- a/Src/VTEX/VTEXWrapper.cs +++ b/Src/VTEX/VTEXWrapper.cs @@ -78,9 +78,7 @@ private static string InternalUserAgent } var assembly = System - .Reflection - .Assembly - .GetAssembly(typeof(VTEXWrapper)) + .Reflection.Assembly.GetAssembly(typeof(VTEXWrapper)) .GetName(); _internalUserAgent = $@"{assembly.Name}/{assembly.Version}"; return _internalUserAgent; @@ -288,16 +286,13 @@ private void ConfigureClient(HttpClient client, bool requiresAuthentication) { client.DefaultRequestHeaders.ExpectContinue = false; client.DefaultRequestHeaders.Accept.Clear(); - client - .DefaultRequestHeaders - .Accept - .Add(new MediaTypeWithQualityHeaderValue(@"application/json")); - client - .DefaultRequestHeaders - .TryAddWithoutValidation( - @"User-Agent", - $@"guiBranco-VTEX-SDK-dotnet {InternalUserAgent} +https://github.com/guibranco/VTEX-SDK-dotnet" - ); + client.DefaultRequestHeaders.Accept.Add( + new MediaTypeWithQualityHeaderValue(@"application/json") + ); + client.DefaultRequestHeaders.TryAddWithoutValidation( + @"User-Agent", + $@"guiBranco-VTEX-SDK-dotnet {InternalUserAgent} +https://github.com/guibranco/VTEX-SDK-dotnet" + ); if (!requiresAuthentication) { return; diff --git a/Tests/VTEX.Tests/Health/VtexHealthClientTests.cs b/Tests/VTEX.Tests/Health/VtexHealthClientTests.cs index ead17e9ef..d44f0d869 100644 --- a/Tests/VTEX.Tests/Health/VtexHealthClientTests.cs +++ b/Tests/VTEX.Tests/Health/VtexHealthClientTests.cs @@ -57,8 +57,7 @@ public async Task ValidateHealthClient() .ReturnsAsync(fixtures); var result = await clientMock - .Object - .GetPlatformStatuesAsync(CancellationToken.None) + .Object.GetPlatformStatuesAsync(CancellationToken.None) .ConfigureAwait(false); Assert.NotNull(result);