18 references to GetRolesAsync
Microsoft.AspNetCore.Identity.EntityFrameworkCore.Test (12)
SqlStoreOnlyUsersTestBase.cs (4)
171Assert.Equal(2, (await manager.GetRolesAsync(userById)).Count); 186Assert.Equal(2, (await manager.GetRolesAsync(userByName)).Count); 201Assert.Equal(2, (await manager.GetRolesAsync(userByLogin)).Count); 217Assert.Equal(2, (await manager.GetRolesAsync(userByEmail)).Count);
SqlStoreTestBase.cs (8)
168var roles = await userMgr.GetRolesAsync(user); 174roles = await userMgr.GetRolesAsync(user); 193var roles = await userMgr.GetRolesAsync(user); 198roles = await userMgr.GetRolesAsync(user); 277Assert.Equal(2, (await manager.GetRolesAsync(userById)).Count); 292Assert.Equal(2, (await manager.GetRolesAsync(userByName)).Count); 307Assert.Equal(2, (await manager.GetRolesAsync(userByLogin)).Count); 334Assert.Equal(2, (await manager.GetRolesAsync(userByEmail)).Count);
Microsoft.AspNetCore.Identity.Specification.Tests (1)
IdentitySpecificationTestBase.cs (1)
408var rs = await userManager.GetRolesAsync(u);
Microsoft.AspNetCore.Identity.Test (4)
UserClaimsPrincipalFactoryTest.cs (1)
58userManager.Setup(m => m.GetRolesAsync(user)).ReturnsAsync(roleClaims);
UserManagerTest.cs (3)
931await Assert.ThrowsAsync<NotSupportedException>(async () => await manager.GetRolesAsync(null)); 1071async () => await manager.GetRolesAsync(null)); 1160await Assert.ThrowsAsync<ObjectDisposedException>(() => manager.GetRolesAsync(null));
Microsoft.Extensions.Identity.Core (1)
UserClaimsPrincipalFactory.cs (1)
141var roles = await UserManager.GetRolesAsync(user).ConfigureAwait(false);