public final class ChangeIsActive extends UpdateActionImpl<ProductDiscount>
See also ProductDiscountUpdateCommand.
withUpdateableProductDiscount(client(), discount -> { final boolean newIsActive = !discount.isActive(); final ProductDiscount updatedDiscount = client().executeBlocking(ProductDiscountUpdateCommand.of(discount, ChangeIsActive.of(newIsActive))); assertThat(updatedDiscount.isActive()).isEqualTo(newIsActive); return updatedDiscount; });
See the test code.
Modifier and Type | Method and Description |
---|---|
boolean |
isActive() |
static ChangeIsActive |
of(boolean isActive) |
getAction
public static ChangeIsActive of(boolean isActive)
public boolean isActive()