public async Task UpdateCustomerByIdSetTitle() { await WithUpdateableCustomer(client, async customer => { var title = TestingUtility.RandomString(); var action = new SetTitleUpdateAction { Title = title }; var updatedCustomer = await client .ExecuteAsync(customer.UpdateById(actions => actions.AddUpdate(action))); Assert.Equal(title, updatedCustomer.Title); return(updatedCustomer); }); }
public async Task UpdateReviewSetTitle() { var newTitle = TestingUtility.RandomString(); await WithUpdateableReview(client, async review => { var updateActions = new List <UpdateAction <Review> >(); var setTextAction = new SetTitleUpdateAction { Title = newTitle }; updateActions.Add(setTextAction); var updatedReview = await client.ExecuteAsync(new UpdateByIdCommand <Review>(review, updateActions)); Assert.Equal(newTitle, updatedReview.Title); return(updatedReview); }); }