public final class ChangeCartPredicate extends UpdateActionImpl<CartDiscount>
See also CartDiscountUpdateCommand.
withPersistentCartDiscount(client(), cartDiscount -> { final String newPredicate = format("totalPrice > \"%d.00 EUR\"", randomInt()); assertThat(cartDiscount.getCartPredicate()).isNotEqualTo(newPredicate); final CartDiscount updatedDiscount = client().executeBlocking(CartDiscountUpdateCommand.of(cartDiscount, ChangeCartPredicate.of(newPredicate))); assertThat(updatedDiscount.getCartPredicate()).isEqualTo(newPredicate); });
See the test code.
Modifier and Type | Method and Description |
---|---|
String |
getCartPredicate() |
static ChangeCartPredicate |
of(CartPredicate cartPredicate) |
static ChangeCartPredicate |
of(String cartPredicate) |
getAction
public static ChangeCartPredicate of(CartPredicate cartPredicate)
public static ChangeCartPredicate of(String cartPredicate)
public String getCartPredicate()