public async Task UpdateProductTypeChangeDescription() { var newDescription = $"UpdateProductTypeChangeDescription-{TestingUtility.RandomString()}"; await WithUpdateableProductType(client, async productType => { var updateActions = new List <UpdateAction <ProductType> >(); var changeDescriptionAction = new ChangeDescriptionUpdateAction { Description = newDescription }; updateActions.Add(changeDescriptionAction); var updatedProductType = await client .ExecuteAsync(new UpdateByIdCommand <ProductType>(productType, updateActions)); Assert.Equal(newDescription, updatedProductType.Description); return(updatedProductType); }); }
public async Task UpdateChannelChangeDescription() { await WithUpdateableChannel(client, async channel => { var newDescription = new LocalizedString { { "en", TestingUtility.RandomString() } }; var updateActions = new List <UpdateAction <Channel> >(); var action = new ChangeDescriptionUpdateAction { Description = newDescription }; updateActions.Add(action); var updatedChannel = await client .ExecuteAsync(new UpdateByIdCommand <Channel>(channel, updateActions)); Assert.Equal(newDescription["en"], updatedChannel.Description["en"]); return(updatedChannel); }); }