fix putEmailAdresses -> putEmailAddresses

This commit is contained in:
Michael Hoennig 2024-04-30 11:23:24 +02:00
parent 90c21e7ec1
commit fed712bf02
4 changed files with 5 additions and 5 deletions

View File

@ -120,7 +120,7 @@ public class HsOfficeContactController implements HsOfficeContactsApi {
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
final BiConsumer<HsOfficeContactInsertResource, HsOfficeContactEntity> RESOURCE_TO_ENTITY_POSTMAPPER = (resource, entity) -> { final BiConsumer<HsOfficeContactInsertResource, HsOfficeContactEntity> RESOURCE_TO_ENTITY_POSTMAPPER = (resource, entity) -> {
entity.putEmailAdresses(from(resource.getEmailAddresses())); entity.putEmailAddresses(from(resource.getEmailAddresses()));
entity.putPhoneNumbers(from(resource.getPhoneNumbers())); entity.putPhoneNumbers(from(resource.getPhoneNumbers()));
}; };
} }

View File

@ -77,7 +77,7 @@ public class HsOfficeContactEntity implements Stringifyable, RbacObject {
return PatchableMapWrapper.of(emailAddressesWrapper, (newWrapper) -> {emailAddressesWrapper = newWrapper; }, emailAddresses ); return PatchableMapWrapper.of(emailAddressesWrapper, (newWrapper) -> {emailAddressesWrapper = newWrapper; }, emailAddresses );
} }
public void putEmailAdresses(Map<String, String> newEmailAddresses) { public void putEmailAddresses(Map<String, String> newEmailAddresses) {
getEmailAddresses().assign(newEmailAddresses); getEmailAddresses().assign(newEmailAddresses);
} }

View File

@ -46,7 +46,7 @@ class HsOfficeContactEntityPatcherUnitTest extends PatchUnitTestBase<
final var entity = new HsOfficeContactEntity(); final var entity = new HsOfficeContactEntity();
entity.setUuid(INITIAL_CONTACT_UUID); entity.setUuid(INITIAL_CONTACT_UUID);
entity.setLabel("initial label"); entity.setLabel("initial label");
entity.putEmailAdresses(Map.ofEntries( entity.putEmailAddresses(Map.ofEntries(
entry("main", "initial@example.org"), entry("main", "initial@example.org"),
entry("paul", "paul@example.com"), entry("paul", "paul@example.com"),
entry("mila", "mila@example.com"))); entry("mila", "mila@example.com")));
@ -80,7 +80,7 @@ class HsOfficeContactEntityPatcherUnitTest extends PatchUnitTestBase<
"resources", "resources",
HsOfficeContactPatchResource::setEmailAddresses, HsOfficeContactPatchResource::setEmailAddresses,
PATCH_EMAIL_ADDRESSES, PATCH_EMAIL_ADDRESSES,
HsOfficeContactEntity::putEmailAdresses, HsOfficeContactEntity::putEmailAddresses,
PATCHED_EMAIL_ADDRESSES) PATCHED_EMAIL_ADDRESSES)
.notNullable(), .notNullable(),
new SimpleProperty<>( new SimpleProperty<>(

View File

@ -1092,7 +1092,7 @@ public class ImportOfficeData extends ContextBasedTest {
contactRecord.getString("first_name"), contactRecord.getString("first_name"),
contactRecord.getString("last_name"), contactRecord.getString("last_name"),
contactRecord.getString("firma"))); contactRecord.getString("firma")));
contact.putEmailAdresses( Map.of("main", contactRecord.getString("email"))); contact.putEmailAddresses( Map.of("main", contactRecord.getString("email")));
contact.setPostalAddress(toAddress(contactRecord)); contact.setPostalAddress(toAddress(contactRecord));
contact.putPhoneNumbers(toPhoneNumbers(contactRecord)); contact.putPhoneNumbers(toPhoneNumbers(contactRecord));