/** * Creates a new update action from the given parameters. * * @param name the {@code name} property {@link ShippingMethod#getName()}. * @return the {@code ChangeName} update action. */ public static ChangeName of(final String name) { return new ChangeName(name); } }
@Test public void changeName() throws Exception { withUpdateableShippingMethod(client(), shippingMethod -> { final String newName = randomString(); assertThat(shippingMethod.getName()).isNotEqualTo(newName); final ShippingMethodUpdateCommand cmd = ShippingMethodUpdateCommand.of(shippingMethod, ChangeName.of(newName)); final ShippingMethod updatedShippingMethod = client().executeBlocking(cmd); assertThat(updatedShippingMethod.getName()).isEqualTo(newName); return updatedShippingMethod; }); }
public static ChangeName of(final String name) { return new ChangeName(name); }
public static ChangeName of(final String name) { return new ChangeName(name); }