From e0cac5e79eb01308fbb1b097be714451ea83cec3 Mon Sep 17 00:00:00 2001 From: Mole Date: Fri, 15 Oct 2021 08:26:23 +0200 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com> --- .../Builders/ContentCultureInfosCollectionBuilder.cs | 2 +- .../Controllers/ContentControllerTests.cs | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/Umbraco.Tests.Common/Builders/ContentCultureInfosCollectionBuilder.cs b/src/Umbraco.Tests.Common/Builders/ContentCultureInfosCollectionBuilder.cs index ba1f7e357d..a090880633 100644 --- a/src/Umbraco.Tests.Common/Builders/ContentCultureInfosCollectionBuilder.cs +++ b/src/Umbraco.Tests.Common/Builders/ContentCultureInfosCollectionBuilder.cs @@ -7,7 +7,7 @@ namespace Umbraco.Cms.Tests.Common.Builders { public class ContentCultureInfosCollectionBuilder : ChildBuilderBase, IBuildContentCultureInfosCollection { - private List _cultureInfosBuilders; + private readonly List _cultureInfosBuilders; public ContentCultureInfosCollectionBuilder(ContentBuilder parentBuilder) : base(parentBuilder) => _cultureInfosBuilders = new List(); public ContentCultureInfosBuilder AddCultureInfos() diff --git a/src/Umbraco.Tests.Integration/Umbraco.Web.BackOffice/Controllers/ContentControllerTests.cs b/src/Umbraco.Tests.Integration/Umbraco.Web.BackOffice/Controllers/ContentControllerTests.cs index 7d9e2f149e..f2aff1b554 100644 --- a/src/Umbraco.Tests.Integration/Umbraco.Web.BackOffice/Controllers/ContentControllerTests.cs +++ b/src/Umbraco.Tests.Integration/Umbraco.Web.BackOffice/Controllers/ContentControllerTests.cs @@ -1,7 +1,6 @@ // Copyright (c) Umbraco. // See LICENSE for more details. -using System.Globalization; using System.Linq; using System.Net; using System.Net.Http; @@ -440,12 +439,11 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Web.BackOffice.Controllers { { new StringContent(JsonConvert.SerializeObject(model)), "contentItem" } }); + var body = await response.Content.ReadAsStringAsync(); body = body.TrimStart(AngularJsonMediaTypeFormatter.XsrfPrefix); ContentItemDisplay display = JsonConvert.DeserializeObject(body); - var currentThreadCulture = Thread.CurrentThread.CurrentCulture.TwoLetterISOLanguageName; - var currentUICulture = Thread.CurrentThread.CurrentUICulture.TwoLetterISOLanguageName; ILocalizedTextService localizedTextService = GetRequiredService(); var expectedMessage = localizedTextService.Localize("speechBubbles", "publishWithNoDomains");