diff --git a/modules/identity/test/Volo.Abp.Identity.TestBase/Volo/Abp/Identity/OrganizationUnitRepository_Tests.cs b/modules/identity/test/Volo.Abp.Identity.TestBase/Volo/Abp/Identity/OrganizationUnitRepository_Tests.cs index 5ff0284194..0e6717f29c 100644 --- a/modules/identity/test/Volo.Abp.Identity.TestBase/Volo/Abp/Identity/OrganizationUnitRepository_Tests.cs +++ b/modules/identity/test/Volo.Abp.Identity.TestBase/Volo/Abp/Identity/OrganizationUnitRepository_Tests.cs @@ -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() {