From ab0deb415bc026295a4bd6e3c9e6b57db89f80ec Mon Sep 17 00:00:00 2001 From: maliming Date: Wed, 15 Mar 2023 21:01:00 +0800 Subject: [PATCH] Create LdapResource_Tests.cs --- .../Volo/Abp/Ldap/LdapResource_Tests.cs | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 framework/test/Volo.Abp.Ldap.Tests/Volo/Abp/Ldap/LdapResource_Tests.cs diff --git a/framework/test/Volo.Abp.Ldap.Tests/Volo/Abp/Ldap/LdapResource_Tests.cs b/framework/test/Volo.Abp.Ldap.Tests/Volo/Abp/Ldap/LdapResource_Tests.cs new file mode 100644 index 0000000000..1563d6812b --- /dev/null +++ b/framework/test/Volo.Abp.Ldap.Tests/Volo/Abp/Ldap/LdapResource_Tests.cs @@ -0,0 +1,30 @@ +using Microsoft.Extensions.Localization; +using Shouldly; +using Volo.Abp.Ldap.Localization; +using Volo.Abp.Localization; +using Volo.Abp.Testing; +using Xunit; + +namespace Volo.Abp.Ldap; + +public class LdapResource_Tests : AbpIntegratedTest +{ + protected override void SetAbpApplicationCreationOptions(AbpApplicationCreationOptions options) + { + options.UseAutofac(); + } + + [Fact] + public void LdapResource_Test() + { + using (CultureHelper.Use("en")) + { + GetRequiredService>()["DisplayName:Abp.Ldap.ServerHost"].Value.ShouldBe("Server host"); + } + + using (CultureHelper.Use("tr")) + { + GetRequiredService>()["DisplayName:Abp.Ldap.ServerHost"].Value.ShouldBe("Sunucu Ana Bilgisayarı"); + } + } +}