9 references to AddToRolesAsync
Microsoft.AspNetCore.Identity.Specification.Tests (2)
IdentitySpecificationTestBase.cs (2)
528
IdentityResultAssert.IsSuccess(await userMgr.
AddToRolesAsync
(user, new[] { roleName, roleName }));
586
IdentityResultAssert.IsSuccess(await manager.
AddToRolesAsync
(user, roleNameList));
Microsoft.AspNetCore.Identity.Test (7)
UserManagerTest.cs (7)
365
var result = await userManager.
AddToRolesAsync
(user, roles);
404
var result = await userManager.
AddToRolesAsync
(user, roles);
429
var result = await userManager.
AddToRolesAsync
(user, roles);
930
await Assert.ThrowsAsync<NotSupportedException>(async () => await manager.
AddToRolesAsync
(null, null));
1041
await Assert.ThrowsAsync<ArgumentNullException>("roles", async () => await manager.
AddToRolesAsync
(new PocoUser(), null));
1063
async () => await manager.
AddToRolesAsync
(null, null));
1156
await Assert.ThrowsAsync<ObjectDisposedException>(() => manager.
AddToRolesAsync
(null, null));