From ad653792cc95c31922903650e806743a89525d6b Mon Sep 17 00:00:00 2001 From: maliming Date: Mon, 1 Feb 2021 10:11:52 +0800 Subject: [PATCH] Update Localization_Tests of TenantManagement module. Resolve #7541 --- .../TenantManagement/Localization_Tests.cs | 23 ++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/modules/tenant-management/test/Volo.Abp.TenantManagement.Domain.Tests/Volo/Abp/TenantManagement/Localization_Tests.cs b/modules/tenant-management/test/Volo.Abp.TenantManagement.Domain.Tests/Volo/Abp/TenantManagement/Localization_Tests.cs index 2718512641..4a856b958c 100644 --- a/modules/tenant-management/test/Volo.Abp.TenantManagement.Domain.Tests/Volo/Abp/TenantManagement/Localization_Tests.cs +++ b/modules/tenant-management/test/Volo.Abp.TenantManagement.Domain.Tests/Volo/Abp/TenantManagement/Localization_Tests.cs @@ -1,5 +1,7 @@ -using Microsoft.Extensions.Localization; +using System.Globalization; +using Microsoft.Extensions.Localization; using Shouldly; +using Volo.Abp.Localization; using Volo.Abp.TenantManagement.Localization; using Xunit; @@ -17,8 +19,23 @@ namespace Volo.Abp.TenantManagement [Fact] public void Test() { - _stringLocalizer["TenantDeletionConfirmationMessage"].Value - .ShouldBe("Tenant '{0}' will be deleted. Do you confirm that?"); + using (CultureHelper.Use("en")) + { + _stringLocalizer["TenantDeletionConfirmationMessage"].Value + .ShouldBe("Tenant '{0}' will be deleted. Do you confirm that?"); + } + + using (CultureHelper.Use("en-gb")) + { + _stringLocalizer["TenantDeletionConfirmationMessage"].Value + .ShouldBe("Tenant '{0}' will be deleted. Is that OK?"); + } + + using (CultureHelper.Use("tr")) + { + _stringLocalizer["TenantDeletionConfirmationMessage"].Value + .ShouldBe("'{0}' isimli müşteri silinecektir. Onaylıyor musunuz?"); + } } } }