public final class Unpublish extends UpdateActionImpl<Product>
See also ProductUpdateCommand.
withUpdateableProduct(client(), product -> {
assertThat(product.getMasterData().isPublished()).isFalse();
final Product publishedProduct = client().executeBlocking(ProductUpdateCommand.of(product, Publish.of()));
assertThat(publishedProduct.getMasterData().isPublished()).isTrue();
final Product unpublishedProduct = client().executeBlocking(ProductUpdateCommand.of(publishedProduct, Unpublish.of()));
assertThat(unpublishedProduct.getMasterData().isPublished()).isFalse();
return unpublishedProduct;
});
See the test code.
ProductUnpublishedMessage
Modifier and Type | Method and Description |
---|---|
static Unpublish |
of() |
getAction
public static Unpublish of()