db-migration #10
@ -22,6 +22,7 @@ class HsOfficePartnerDetailsEntityPatcher implements EntityPatcher<HsOfficePartn
|
|||||||
OptionalFromJson.of(resource.getRegistrationOffice()).ifPresent(entity::setRegistrationOffice);
|
OptionalFromJson.of(resource.getRegistrationOffice()).ifPresent(entity::setRegistrationOffice);
|
||||||
OptionalFromJson.of(resource.getRegistrationNumber()).ifPresent(entity::setRegistrationNumber);
|
OptionalFromJson.of(resource.getRegistrationNumber()).ifPresent(entity::setRegistrationNumber);
|
||||||
OptionalFromJson.of(resource.getBirthday()).ifPresent(entity::setBirthday);
|
OptionalFromJson.of(resource.getBirthday()).ifPresent(entity::setBirthday);
|
||||||
|
OptionalFromJson.of(resource.getBirthPlace()).ifPresent(entity::setBirthPlace);
|
||||||
OptionalFromJson.of(resource.getBirthName()).ifPresent(entity::setBirthName);
|
OptionalFromJson.of(resource.getBirthName()).ifPresent(entity::setBirthName);
|
||||||
OptionalFromJson.of(resource.getDateOfDeath()).ifPresent(entity::setDateOfDeath);
|
OptionalFromJson.of(resource.getDateOfDeath()).ifPresent(entity::setDateOfDeath);
|
||||||
}
|
}
|
||||||
|
@ -32,6 +32,9 @@ components:
|
|||||||
birthName:
|
birthName:
|
||||||
type: string
|
type: string
|
||||||
nullable: true
|
nullable: true
|
||||||
|
birthPlace:
|
||||||
|
type: string
|
||||||
|
nullable: true
|
||||||
birthday:
|
birthday:
|
||||||
type: string
|
type: string
|
||||||
format: date
|
format: date
|
||||||
@ -68,6 +71,9 @@ components:
|
|||||||
birthName:
|
birthName:
|
||||||
type: string
|
type: string
|
||||||
nullable: true
|
nullable: true
|
||||||
|
birthPlace:
|
||||||
|
type: string
|
||||||
|
nullable: true
|
||||||
birthday:
|
birthday:
|
||||||
type: string
|
type: string
|
||||||
format: date
|
format: date
|
||||||
@ -106,6 +112,9 @@ components:
|
|||||||
birthName:
|
birthName:
|
||||||
type: string
|
type: string
|
||||||
nullable: true
|
nullable: true
|
||||||
|
birthPlace:
|
||||||
|
type: string
|
||||||
|
nullable: true
|
||||||
birthday:
|
birthday:
|
||||||
type: string
|
type: string
|
||||||
format: date
|
format: date
|
||||||
|
@ -28,8 +28,9 @@ class HsOfficePartnerDetailsEntityPatcherUnitTest extends PatchUnitTestBase<
|
|||||||
> {
|
> {
|
||||||
|
|
||||||
private static final UUID INITIAL_PARTNER_UUID = UUID.randomUUID();
|
private static final UUID INITIAL_PARTNER_UUID = UUID.randomUUID();
|
||||||
private static final UUID INITIAL_CONTACT_UUID = UUID.randomUUID();
|
|
||||||
private static final UUID INITIAL_PERSON_UUID = UUID.randomUUID();
|
private static final String INITIAL_BIRTHPLACE = null;
|
||||||
|
private static final String PATCHED_BIRTHPLACE = "Essen (Ruhr)";
|
||||||
|
|
||||||
private static final LocalDate INITIAL_BIRTHDAY = LocalDate.parse("1900-01-01");
|
private static final LocalDate INITIAL_BIRTHDAY = LocalDate.parse("1900-01-01");
|
||||||
private static final LocalDate PATCHED_BIRTHDAY = LocalDate.parse("1990-12-31");
|
private static final LocalDate PATCHED_BIRTHDAY = LocalDate.parse("1990-12-31");
|
||||||
@ -54,6 +55,7 @@ class HsOfficePartnerDetailsEntityPatcherUnitTest extends PatchUnitTestBase<
|
|||||||
entity.setUuid(INITIAL_PARTNER_UUID);
|
entity.setUuid(INITIAL_PARTNER_UUID);
|
||||||
entity.setRegistrationOffice("initial Reg-Office");
|
entity.setRegistrationOffice("initial Reg-Office");
|
||||||
entity.setRegistrationNumber("initial Reg-Number");
|
entity.setRegistrationNumber("initial Reg-Number");
|
||||||
|
entity.setBirthPlace(INITIAL_BIRTHPLACE);
|
||||||
entity.setBirthday(INITIAL_BIRTHDAY);
|
entity.setBirthday(INITIAL_BIRTHDAY);
|
||||||
entity.setBirthName("initial birth name");
|
entity.setBirthName("initial birth name");
|
||||||
entity.setDateOfDeath(INITIAL_DAY_OF_DEATH);
|
entity.setDateOfDeath(INITIAL_DAY_OF_DEATH);
|
||||||
@ -78,6 +80,16 @@ class HsOfficePartnerDetailsEntityPatcherUnitTest extends PatchUnitTestBase<
|
|||||||
HsOfficePartnerDetailsPatchResource::setRegistrationOffice,
|
HsOfficePartnerDetailsPatchResource::setRegistrationOffice,
|
||||||
"patched Reg-Office",
|
"patched Reg-Office",
|
||||||
HsOfficePartnerDetailsEntity::setRegistrationOffice),
|
HsOfficePartnerDetailsEntity::setRegistrationOffice),
|
||||||
|
new JsonNullableProperty<>(
|
||||||
|
"birthplace",
|
||||||
|
HsOfficePartnerDetailsPatchResource::setBirthPlace,
|
||||||
|
PATCHED_BIRTHPLACE,
|
||||||
|
HsOfficePartnerDetailsEntity::setBirthPlace),
|
||||||
|
new JsonNullableProperty<>(
|
||||||
|
"birthname",
|
||||||
|
HsOfficePartnerDetailsPatchResource::setBirthName,
|
||||||
|
"patched birth name",
|
||||||
|
HsOfficePartnerDetailsEntity::setBirthName),
|
||||||
new JsonNullableProperty<>(
|
new JsonNullableProperty<>(
|
||||||
"birthday",
|
"birthday",
|
||||||
HsOfficePartnerDetailsPatchResource::setBirthday,
|
HsOfficePartnerDetailsPatchResource::setBirthday,
|
||||||
|
Loading…
Reference in New Issue
Block a user