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