12 references to IsInRoleAsync
Microsoft.AspNetCore.Identity.Specification.Tests (9)
IdentitySpecificationTestBase.cs (9)
376
Assert.True(await manager.
IsInRoleAsync
(u, roleName));
402
Assert.True(await userManager.
IsInRoleAsync
(u, await roleManager.GetRoleNameAsync(r)));
435
Assert.True(await userManager.
IsInRoleAsync
(user, await roleManager.GetRoleNameAsync(r)));
438
Assert.False(await userManager.
IsInRoleAsync
(user, await roleManager.GetRoleNameAsync(roles[2])));
462
Assert.True(await userManager.
IsInRoleAsync
(u, roleName));
467
Assert.False(await userManager.
IsInRoleAsync
(u, roleName));
507
Assert.True(await userMgr.
IsInRoleAsync
(user, roleName));
527
Assert.False(await userMgr.
IsInRoleAsync
(user, roleName));
529
Assert.True(await userMgr.
IsInRoleAsync
(user, roleName));
Microsoft.AspNetCore.Identity.Test (3)
UserManagerTest.cs (3)
934
await Assert.ThrowsAsync<NotSupportedException>(async () => await manager.
IsInRoleAsync
(null, "bogus"));
1073
async () => await manager.
IsInRoleAsync
(null, null));
1161
await Assert.ThrowsAsync<ObjectDisposedException>(() => manager.
IsInRoleAsync
(null, null));