maliming
4 years ago
No known key found for this signature in database
GPG Key ID: 96224957E51C89E
2 changed files with
4 additions and
4 deletions
-
modules/tenant-management/test/Volo.Abp.TenantManagement.Application.Tests/Volo/Abp/TenantManagement/TenantAppService_Tests.cs
-
modules/tenant-management/test/Volo.Abp.TenantManagement.Domain.Tests/Volo/Abp/TenantManagement/TenantManager_Tests.cs
|
|
|
@ -66,7 +66,7 @@ public class TenantAppService_Tests : AbpTenantManagementApplicationTestBase |
|
|
|
[Fact] |
|
|
|
public async Task CreateAsync_Should_Not_Allow_Duplicate_Names() |
|
|
|
{ |
|
|
|
await Assert.ThrowsAsync<UserFriendlyException>(async () => |
|
|
|
await Assert.ThrowsAsync<BusinessException>(async () => |
|
|
|
{ |
|
|
|
await _tenantAppService.CreateAsync(new TenantCreateDto { Name = "acme", AdminEmailAddress = "admin@admin.com", AdminPassword = "123456" }); |
|
|
|
}); |
|
|
|
@ -90,7 +90,7 @@ public class TenantAppService_Tests : AbpTenantManagementApplicationTestBase |
|
|
|
{ |
|
|
|
var acme = UsingDbContext(dbContext => dbContext.Tenants.Single(t => t.Name == "acme")); |
|
|
|
|
|
|
|
await Assert.ThrowsAsync<UserFriendlyException>(async () => |
|
|
|
await Assert.ThrowsAsync<BusinessException>(async () => |
|
|
|
{ |
|
|
|
await _tenantAppService.UpdateAsync(acme.Id, new TenantUpdateDto { Name = "volosoft" }); |
|
|
|
}); |
|
|
|
|
|
|
|
@ -26,7 +26,7 @@ public class TenantManager_Tests : AbpTenantManagementDomainTestBase |
|
|
|
[Fact] |
|
|
|
public async Task Create_Tenant_Name_Can_Not_Duplicate() |
|
|
|
{ |
|
|
|
await Assert.ThrowsAsync<UserFriendlyException>(async () => await _tenantManager.CreateAsync("volosoft")); |
|
|
|
await Assert.ThrowsAsync<BusinessException>(async () => await _tenantManager.CreateAsync("volosoft")); |
|
|
|
} |
|
|
|
|
|
|
|
[Fact] |
|
|
|
@ -46,6 +46,6 @@ public class TenantManager_Tests : AbpTenantManagementDomainTestBase |
|
|
|
var tenant = await _tenantRepository.FindByNameAsync("acme"); |
|
|
|
tenant.ShouldNotBeNull(); |
|
|
|
|
|
|
|
await Assert.ThrowsAsync<UserFriendlyException>(async () => await _tenantManager.ChangeNameAsync(tenant, "volosoft")); |
|
|
|
await Assert.ThrowsAsync<BusinessException>(async () => await _tenantManager.ChangeNameAsync(tenant, "volosoft")); |
|
|
|
} |
|
|
|
} |
|
|
|
|