12 references to IsInRoleAsync
Microsoft.AspNetCore.Identity.Specification.Tests (9)
IdentitySpecificationTestBase.cs (9)
377Assert.True(await manager.IsInRoleAsync(u, roleName)); 403Assert.True(await userManager.IsInRoleAsync(u, await roleManager.GetRoleNameAsync(r))); 436Assert.True(await userManager.IsInRoleAsync(user, await roleManager.GetRoleNameAsync(r))); 439Assert.False(await userManager.IsInRoleAsync(user, await roleManager.GetRoleNameAsync(roles[2]))); 463Assert.True(await userManager.IsInRoleAsync(u, roleName)); 468Assert.False(await userManager.IsInRoleAsync(u, roleName)); 508Assert.True(await userMgr.IsInRoleAsync(user, roleName)); 528Assert.False(await userMgr.IsInRoleAsync(user, roleName)); 530Assert.True(await userMgr.IsInRoleAsync(user, roleName));
Microsoft.AspNetCore.Identity.Test (3)
UserManagerTest.cs (3)
1266await Assert.ThrowsAsync<NotSupportedException>(async () => await manager.IsInRoleAsync(null, "bogus")); 1409async () => await manager.IsInRoleAsync(null, null)); 1505await Assert.ThrowsAsync<ObjectDisposedException>(() => manager.IsInRoleAsync(null, null));