From 66f237907dca7281dcfcb5f0437cd983114c6755 Mon Sep 17 00:00:00 2001 From: "gstraccini[bot]" <44061807+gstraccini[bot]@users.noreply.github.com> Date: Mon, 18 Dec 2023 13:18:36 +0000 Subject: [PATCH] CSharpier format --- Src/VTEX/VTEXContext.cs | 15 ++++++------- Src/VTEX/VTEXWrapper.cs | 21 +++++++------------ .../Health/VtexHealthClientTests.cs | 3 +-- 3 files changed, 17 insertions(+), 22 deletions(-) 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);