use of ch.aaap.harvestclient.domain.param.ClientContactUpdateInfo in project harvest-client by 3AP-AG.
the class ClientContactsApiUpdateTest method changeAll.
@Test
void changeAll() {
// opposites of the defaults
String title = "Mr. ";
String firstName = "test first";
String lastName = "test Last";
String email = "hey@example.com";
String phoneOffice = "006 00 12";
String phoneMobile = "1232 32323 32 ";
String fax = "this is a fax ?";
ClientContactUpdateInfo changes = ImmutableClientContactUpdateInfo.builder().firstName(firstName).lastName(lastName).email(email).phoneMobile(phoneMobile).phoneOffice(phoneOffice).fax(fax).build();
ClientContact updatedClientContact = clientContactsApi.update(clientContact, changes);
assertThat(updatedClientContact).isEqualToComparingOnlyGivenFields(changes, "title", "firstName", "lastName", "email", "phoneOffice", "phoneMobile", "fax");
}
use of ch.aaap.harvestclient.domain.param.ClientContactUpdateInfo in project harvest-client by 3AP-AG.
the class ClientContactsApiUpdateTest method changeFirstName.
@Test
void changeFirstName() {
ClientContactUpdateInfo changes = ImmutableClientContactUpdateInfo.builder().firstName("new clientContact name").build();
ClientContact updatedClientContact = clientContactsApi.update(clientContact, changes);
assertThat(updatedClientContact.getFirstName()).isEqualTo(changes.getFirstName());
}
Aggregations