Added logging in test

This commit is contained in:
Nikolaj Geisle
2021-10-14 14:07:31 +02:00
parent 7379387b2e
commit 76a8d4c474
3 changed files with 10 additions and 12 deletions

View File

@@ -444,8 +444,12 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Web.BackOffice.Controllers
body = body.TrimStart(AngularJsonMediaTypeFormatter.XsrfPrefix);
ContentItemDisplay display = JsonConvert.DeserializeObject<ContentItemDisplay>(body);
Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US");
TestContext.Progress.Write($"======CURRENT THREAD CULTURE IN TEST======{Thread.CurrentThread.CurrentCulture.Name}");
ILocalizedTextService localizedTextService = GetRequiredService<ILocalizedTextService>();
foreach (var culture in localizedTextService.GetSupportedCultures())
{
TestContext.Progress.Write($"======SUPPORTED CULTURES IN TEXT SERVICE======{culture.Name}");
}
var expectedMessage = localizedTextService.Localize("speechBubbles", "publishWithNoDomains", new []{"en-US"});
Assert.Multiple(() =>
@@ -507,6 +511,7 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Web.BackOffice.Controllers
body = body.TrimStart(AngularJsonMediaTypeFormatter.XsrfPrefix);
ContentItemDisplay display = JsonConvert.DeserializeObject<ContentItemDisplay>(body);
ILocalizedTextService localizedTextService = GetRequiredService<ILocalizedTextService>();
var expectedMessage = localizedTextService.Localize("speechBubbles", "publishWithMissingDomain", new []{"en-US"});