Browse Source
Merge pull request #10704 from abpframework/cotur/test-fix
Fix identity module tests
pull/10710/head
maliming
5 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
8 additions and
4 deletions
-
modules/identity/test/Volo.Abp.Identity.Domain.Tests/Volo/Abp/Identity/AbpIdentityResultException_Tests.cs
-
modules/identity/test/Volo.Abp.Identity.Domain.Tests/Volo/Abp/Identity/Localization_Tests.cs
|
|
|
@ -29,8 +29,8 @@ public class AbpIdentityResultException_Tests : AbpIdentityDomainTestBase |
|
|
|
{ |
|
|
|
var localizeMessage = exception.LocalizeMessage(new LocalizationContext(ServiceProvider)); |
|
|
|
|
|
|
|
localizeMessage.ShouldContain("Şifre en az 6 karakter uzunluğunda olmalı."); |
|
|
|
localizeMessage.ShouldContain("Şifre en az bir sayı ya da harf olmayan karakter içermeli."); |
|
|
|
localizeMessage.ShouldContain("Şifre uzunluğu 6 karakterden uzun olmalıdır."); |
|
|
|
localizeMessage.ShouldContain("Parola en az bir alfasayısal olmayan karakter içermeli"); |
|
|
|
} |
|
|
|
|
|
|
|
using (CultureHelper.Use("en")) |
|
|
|
|
|
|
|
@ -2,6 +2,7 @@ |
|
|
|
using Shouldly; |
|
|
|
using Volo.Abp.Identity; |
|
|
|
using Volo.Abp.Identity.Localization; |
|
|
|
using Volo.Abp.Localization; |
|
|
|
using Xunit; |
|
|
|
|
|
|
|
namespace Volo.Abp.TenantManagement; |
|
|
|
@ -18,7 +19,10 @@ public class Localization_Tests : AbpIdentityDomainTestBase |
|
|
|
[Fact] |
|
|
|
public void Test() |
|
|
|
{ |
|
|
|
_stringLocalizer["PersonalSettingsSavedMessage"].Value |
|
|
|
.ShouldBe("Your personal settings has been saved successfully."); |
|
|
|
using (CultureHelper.Use("en")) |
|
|
|
{ |
|
|
|
_stringLocalizer["PersonalSettingsSavedMessage"].Value |
|
|
|
.ShouldBe("Your personal settings has been saved successfully."); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|