public final class ChangeName extends UpdateActionImpl<Customer>
See also CustomerInStoreUpdateCommand.
withCustomer(client(), customer -> { final CustomerName newName = CustomerName.ofTitleFirstAndLastName("Mister", "John", "Smith"); assertThat(customer.getName()).isNotEqualTo(newName); final Customer updatedCustomer = client().executeBlocking(new VrapRequestDecorator<>(CustomerUpdateCommand.of(customer, ChangeName.of(newName)), "request")); assertThat(updatedCustomer.getName()).isEqualTo(newName); });
See the test code.
Customer
Modifier and Type | Method and Description |
---|---|
String |
getFirstName() |
String |
getLastName() |
String |
getMiddleName() |
String |
getTitle() |
static ChangeName |
of(CustomerName name) |
getAction
public static ChangeName of(CustomerName name)
public String getFirstName()
public String getLastName()