public async Task UpdateAsync() { //Arrange var moderator = await GetRoleAsync("moderator"); var input = new IdentityRoleUpdateDto { Name = Guid.NewGuid().ToString("N").Left(8), ConcurrencyStamp = moderator.ConcurrencyStamp, IsDefault = moderator.IsDefault, IsPublic = moderator.IsPublic }; //Act var result = await _roleAppService.UpdateAsync(moderator.Id, input); //Assert result.Id.ShouldBe(moderator.Id); result.Name.ShouldBe(input.Name); var updatedRole = await _roleRepository.GetAsync(moderator.Id); updatedRole.Name.ShouldBe(input.Name); }
/// <summary> /// Updates the specified identifier. /// </summary> /// <param name="id">The identifier.</param> /// <param name="input">The input.</param> /// <returns>Task<IdentityRoleDto>.</returns> public virtual Task <IdentityRoleDto> Update(string id, IdentityRoleUpdateDto input) { return(_appService.UpdateAsync(id.ToGuid(), input)); }
public virtual Task <IdentityRoleDto> UpdateAsync(Guid id, IdentityRoleUpdateDto input) { return(_roleAppService.UpdateAsync(id, input)); }
public async Task <IdentityRoleDto> UpdateAsync(UpdateRoleInput input) { return(await _identityRoleAppService.UpdateAsync(input.RoleId, input.RoleInfo)); }