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);