Add unit test

pull/4304/head
liangshiwei 5 years ago
parent 9914b09b7f
commit 5f412d860d

@ -143,6 +143,19 @@ namespace Volo.Abp.Identity
usersCount.ShouldBeGreaterThan(1);
}
[Fact]
public async Task GetMembersCountOfOrganizationUnitWithParamsAsync()
{
OrganizationUnit ou = await _organizationUnitRepository.GetAsync("OU111", true);
var usersCount = await _organizationUnitRepository.GetMembersCountAsync(ou,"n");
usersCount.ShouldBeGreaterThan(1);
usersCount.ShouldBeLessThanOrEqualTo(5);
usersCount = await _organizationUnitRepository.GetMembersCountAsync(ou,"undefined-username");
usersCount.ShouldBe(0);
}
[Fact]
public async Task GetRolesCountOfOrganizationUnit()
{

Loading…
Cancel
Save