public final class SetDescription extends UpdateActionImpl<Category>
See also CategoryUpdateCommand.
withCategory(client(), category -> {
final LocalizedString newDescription = randomSlug();
final CategoryUpdateCommand command = CategoryUpdateCommand.of(category, SetDescription.of(newDescription));
final Category updatedCategory = client().executeBlocking(command);
assertThat(updatedCategory.getDescription()).isEqualTo(newDescription);
});
See the test code.
Modifier and Type | Method and Description |
---|---|
LocalizedString |
getDescription() |
static SetDescription |
of(LocalizedString description) |
getAction
public static SetDescription of(@Nullable LocalizedString description)
@Nullable public LocalizedString getDescription()