Browse Source

Create LdapResource_Tests.cs

pull/15979/head
maliming 3 years ago
parent
commit
ab0deb415b
No known key found for this signature in database GPG Key ID: A646B9CB645ECEA4
  1. 30
      framework/test/Volo.Abp.Ldap.Tests/Volo/Abp/Ldap/LdapResource_Tests.cs

30
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<AbpLdapTestModule>
{
protected override void SetAbpApplicationCreationOptions(AbpApplicationCreationOptions options)
{
options.UseAutofac();
}
[Fact]
public void LdapResource_Test()
{
using (CultureHelper.Use("en"))
{
GetRequiredService<IStringLocalizer<LdapResource>>()["DisplayName:Abp.Ldap.ServerHost"].Value.ShouldBe("Server host");
}
using (CultureHelper.Use("tr"))
{
GetRequiredService<IStringLocalizer<LdapResource>>()["DisplayName:Abp.Ldap.ServerHost"].Value.ShouldBe("Sunucu Ana Bilgisayarı");
}
}
}
Loading…
Cancel
Save