From 038d60b789eaa96d5b343aa6ce500a8e93a3ad41 Mon Sep 17 00:00:00 2001 From: Michael Hoennig Date: Mon, 8 Apr 2024 11:47:47 +0200 Subject: [PATCH] fix merge conflicts and TODOs --- .../office/debitor/HsOfficeDebitorEntity.java | 1 + ...OfficePartnerControllerAcceptanceTest.java | 24 ++++++++----------- 2 files changed, 11 insertions(+), 14 deletions(-) diff --git a/src/main/java/net/hostsharing/hsadminng/hs/office/debitor/HsOfficeDebitorEntity.java b/src/main/java/net/hostsharing/hsadminng/hs/office/debitor/HsOfficeDebitorEntity.java index 7a2cb1ec..51df906f 100644 --- a/src/main/java/net/hostsharing/hsadminng/hs/office/debitor/HsOfficeDebitorEntity.java +++ b/src/main/java/net/hostsharing/hsadminng/hs/office/debitor/HsOfficeDebitorEntity.java @@ -26,6 +26,7 @@ import jakarta.persistence.Id; import jakarta.persistence.JoinColumn; import jakarta.persistence.ManyToOne; import jakarta.persistence.Table; +import jakarta.persistence.Version; import jakarta.validation.constraints.Pattern; import java.io.IOException; import java.util.UUID; diff --git a/src/test/java/net/hostsharing/hsadminng/hs/office/partner/HsOfficePartnerControllerAcceptanceTest.java b/src/test/java/net/hostsharing/hsadminng/hs/office/partner/HsOfficePartnerControllerAcceptanceTest.java index e8eac1c1..a3d5e4c4 100644 --- a/src/test/java/net/hostsharing/hsadminng/hs/office/partner/HsOfficePartnerControllerAcceptanceTest.java +++ b/src/test/java/net/hostsharing/hsadminng/hs/office/partner/HsOfficePartnerControllerAcceptanceTest.java @@ -402,23 +402,19 @@ class HsOfficePartnerControllerAcceptanceTest extends ContextBasedTestWithCleanu .statusCode(200) .contentType(ContentType.JSON) .body("uuid", isUuidValid()) - .body("details.birthName", is("Maja Schmidt")); - // TODO: assert partnerRel -// .body("contact.label", is(givenPartner.getContact().getLabel())) -// .body("person.tradeName", is(givenPartner.getPerson().getTradeName())); + .body("details.birthName", is("Maja Schmidt")) + .body("partnerRel.contact.label", is(givenPartner.getPartnerRel().getContact().getLabel())); // @formatter:on - // finally, the partner is actually updated + // finally, the partner details and only the partner details are actually updated assertThat(partnerRepo.findByUuid(givenPartner.getUuid())).isPresent().get() - .matches(person -> { - // TODO: assert partnerRel -// assertThat(person.getPerson().getTradeName()).isEqualTo(givenPartner.getPerson().getTradeName()); -// assertThat(person.getContact().getLabel()).isEqualTo(givenPartner.getContact().getLabel()); - assertThat(person.getDetails().getRegistrationOffice()).isEqualTo("Temp Registergericht Leer"); - assertThat(person.getDetails().getRegistrationNumber()).isEqualTo("333333"); - assertThat(person.getDetails().getBirthName()).isEqualTo("Maja Schmidt"); - assertThat(person.getDetails().getBirthday()).isEqualTo("1938-04-08"); - assertThat(person.getDetails().getDateOfDeath()).isEqualTo("2022-01-12"); + .matches(partner -> { + assertThat(partner.getPartnerRel().getContact().getLabel()).isEqualTo(givenPartner.getPartnerRel().getContact().getLabel()); + assertThat(partner.getDetails().getRegistrationOffice()).isEqualTo("Temp Registergericht Leer"); + assertThat(partner.getDetails().getRegistrationNumber()).isEqualTo("333333"); + assertThat(partner.getDetails().getBirthName()).isEqualTo("Maja Schmidt"); + assertThat(partner.getDetails().getBirthday()).isEqualTo("1938-04-08"); + assertThat(partner.getDetails().getDateOfDeath()).isEqualTo("2022-01-12"); return true; }); }