fix merge conflicts and TODOs

This commit is contained in:
Michael Hoennig 2024-04-08 11:47:47 +02:00
parent ec1deb8903
commit 038d60b789
2 changed files with 11 additions and 14 deletions

View File

@ -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;

View File

@ -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;
});
}