public final class SetTarget extends UpdateActionImpl<Review>
See also ReviewUpdateCommand.
withProduct(client(), (Product product) -> {
withUpdateableReview(client(), (Review review) -> {
final Review updatedReview =
client().executeBlocking(ReviewUpdateCommand.of(review, SetTarget.of(product)));
assertThat(updatedReview.getTarget()).isEqualTo(product.toReference());
return updatedReview;
});
});
See the test code.
Modifier and Type | Method and Description |
---|---|
ResourceIdentifier<?> |
getTarget() |
static SetTarget |
of(ResourceIdentifiable<?> target) |
getAction
public static SetTarget of(@Nullable ResourceIdentifiable<?> target)
@Nullable public ResourceIdentifier<?> getTarget()