public async Task UpdateAsync_WhenCalled_ShouldCreateUser() { var user = await _resource.UpdateAsync(new UserUpdateRequest(1) { Id = 1, Name = "MyNewOrgName", ExternalId = "999999" }); Assert.Equal("MyNewOrgName", user.Name); Assert.Equal("999999", user.ExternalId); }
public async Task ShouldUpdateUser() { var user = await _resource.CreateAsync( new UserCreateRequest("name") { Email = "*****@*****.**", Name = "Kung Fu Wizard" }); Assert.Equal("Kung Fu Wizard", user.Name); var updateRequest = new UserUpdateRequest(user.Id) { Name = "Cheese Master" }; var userUpdated = await _resource.UpdateAsync(updateRequest); Assert.Equal("Cheese Master", userUpdated.Name); }