Update() public method

Updates a specified user. User API key usage permitted. In this case, it can only be used to update currently associated user's data. User_id is automatically filled with current user's id. The user_id/user_name parameter means that one can use either one of them - user_id or user_name.
public Update ( string userId = null, string userName = null, string nick = null, string avatar = null, string newPassword = null, string currentPassword = null ) : Task
userId string User id defining user. If both id and name are specified, will use id for getting user while user_name will be updated with provided new value. User_id is automatically filled when used with User API key.
userName string User name defining user. If both id and name are specified, will use id for getting user while user_name will be updated with provided new value.
nick string New user nickname.
avatar string User avatar. If specified as empty string - will instead delete current avatar.
newPassword string New user password.
currentPassword string Current password for confirmation. Required only when used with User API key and new_password is specified.
return Task
        public async Task Update_DeleteAvatar_UpdatesUserObject(UserSyncanoClient client)
        {
            //given
            string name = "newUserName" + Guid.NewGuid().GetHashCode();
            const string password = "******";
            var user = await client.New(name, password, avatar: TestData.ImageToBase64("smallSampleImage.png"));

            //when
            var updatedUser = await client.Update(user.Id, avatar: "", currentPassword: password);

            //then
            updatedUser.ShouldNotBeNull();
            updatedUser.Id.ShouldEqual(user.Id);
            updatedUser.Avatar.ShouldBeNull();

            //cleanup
            await client.Delete(user.Id);
        }
        public async Task Update_NoUserId_UpdatesUserObject_OverHttp()
        {
            //given
            var httpClient =
             new UserSyncanoClient(new SyncanoHttpClient(TestData.InstanceName, TestData.UserApiKey));
            await httpClient.Login(TestData.UserName, TestData.UserPassword);

            
            //when
            var user = await httpClient.Update(currentPassword: TestData.UserPassword);

            //then
            user.Name.ShouldEqual(TestData.UserName);
           
        }
        public async Task Update_NewPassword_UpdatesUserObject(UserSyncanoClient client)
        {
            //given
            string name = "newUserName" + Guid.NewGuid().GetHashCode();
            const string password = "******";
            const string newPassword = "******";
            var user = await client.New(name, password);

            //when
            var updatedUser = await client.Update(user.Id, newPassword: newPassword, currentPassword: password);

            //then
            updatedUser.ShouldNotBeNull();
            updatedUser.Id.ShouldEqual(user.Id);

            //cleanup
            await client.Delete(user.Id);
        }