/** * Creates a new update action to unset the {@code predicate} property. * @return the {@code SetPredicate} update action. */ public static SetPredicate ofUnset() { return new SetPredicate(null); } }
@Test public void setPredicate() throws Exception { withUpdateableShippingMethod(client(), shippingMethod -> { final String predicate = "1=1"; final ShippingMethod updatedShippingMethod = client().executeBlocking(ShippingMethodUpdateCommand.of(shippingMethod, SetPredicate.of(predicate))); assertThat(updatedShippingMethod.getPredicate()).isEqualTo(predicate); return updatedShippingMethod; }); }
/** * Creates a new update action from the given parameters. * * @param predicate the {@code predicate} property {@link ShippingMethod#getPredicate()}. * @return the {@code SetPredicate} update action. */ public static SetPredicate of(@Nullable final String predicate) { return new SetPredicate(predicate); }