public async Task RoleStore_create_update() { var role = _roleTestFactory.CreateRole(); await _roleStore.CreateAsync(role, default(CancellationToken)); await _roleStore.SetNormalizedRoleNameAsync(role, role.Name, default(CancellationToken)); var fetchedRole = await _roleStore.FindByNameAsync(role.Name, default(CancellationToken)); role.Name.ShouldMatch(fetchedRole.Name); await _roleStore.SetRoleNameAsync(role, "dog", default(CancellationToken)); await _roleStore.SetNormalizedRoleNameAsync(role, role.Name, default(CancellationToken)); await _roleStore.UpdateAsync(role, default(CancellationToken)); fetchedRole = await _roleStore.FindByNameAsync(role.Name, default(CancellationToken)); role.Name.ShouldMatch(fetchedRole.Name); }
public async Task <IdentityResult> UpdateAsync(ApplicationRole role, CancellationToken cancellationToken) { return(await roleStore.UpdateAsync(role, cancellationToken)); }