You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
abp/modules/tenant-management/test/Volo.Abp.TenantManagement.D.../Volo/Abp/TenantManagement/Tenant_Tests.cs

36 lines
1.0 KiB

using System.Threading.Tasks;
using Shouldly;
using Xunit;
namespace Volo.Abp.TenantManagement
{
public class Tenant_Tests : AbpTenantManagementDomainTestBase
{
private readonly ITenantRepository _tenantRepository;
public Tenant_Tests()
{
_tenantRepository = GetRequiredService<ITenantRepository>();
}
[Fact]
public async Task FindDefaultConnectionString()
{
var acme = await _tenantRepository.FindByNameAsync("acme");
acme.ShouldNotBeNull();
acme.FindDefaultConnectionString().ShouldBe("DefaultConnString-Value");
}
[Fact]
public async Task FindConnectionString()
{
var acme = await _tenantRepository.FindByNameAsync("acme");
acme.ShouldNotBeNull();
acme.FindConnectionString(Data.ConnectionStrings.DefaultConnectionStringName).ShouldBe("DefaultConnString-Value");
acme.FindConnectionString("MyConnString").ShouldBe("MyConnString-Value");
}
}
}