feature/add-scenario-test-for-deceased-partner-with-community-of-heirs #137
@ -604,6 +604,7 @@ class HsOfficeScenarioTests extends ScenarioTest {
|
|||||||
new ReplaceDeceasedPartnerWithCommunityOfHeirs(scenarioTest)
|
new ReplaceDeceasedPartnerWithCommunityOfHeirs(scenarioTest)
|
||||||
.given("partnerNumber", "P-31011")
|
.given("partnerNumber", "P-31011")
|
||||||
.given("nameOfDeceasedPerson", "Michelle Matthieu") // FIXME: redundant
|
.given("nameOfDeceasedPerson", "Michelle Matthieu") // FIXME: redundant
|
||||||
|
.given("dateOfDeath", "2024-11-15")
|
||||||
.given(
|
.given(
|
||||||
// "name": "Erbengemeinschaft Michelle Matthieu", // FIXME: automatic?
|
// "name": "Erbengemeinschaft Michelle Matthieu", // FIXME: automatic?
|
||||||
"communityOfHeirsPostalAddress", """
|
"communityOfHeirsPostalAddress", """
|
||||||
|
@ -63,6 +63,11 @@ public class ReplaceDeceasedPartnerWithCommunityOfHeirs extends UseCase<ReplaceD
|
|||||||
.expecting(HttpStatus.CREATED).expecting(ContentType.JSON)
|
.expecting(HttpStatus.CREATED).expecting(ContentType.JSON)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// Repräsentanten Person für die Erbengemeinschaft anlegen
|
||||||
|
|
||||||
|
// Repräsentanten Relation zur Erbengemeinschaft für die zuvor erzeugte Person zur Erbengemeinschaft anlegen
|
||||||
|
|
||||||
|
|
||||||
obtain("Partner-Relation: Erbengemeinschaft %{nameOfDeceasedPerson}", () ->
|
obtain("Partner-Relation: Erbengemeinschaft %{nameOfDeceasedPerson}", () ->
|
||||||
httpPost("/api/hs/office/relations", usingJsonBody("""
|
httpPost("/api/hs/office/relations", usingJsonBody("""
|
||||||
{
|
{
|
||||||
@ -77,7 +82,7 @@ public class ReplaceDeceasedPartnerWithCommunityOfHeirs extends UseCase<ReplaceD
|
|||||||
|
|
||||||
// httpGet("/api/hs/office/debitors/%{partnerNumber}") FIXME
|
// httpGet("/api/hs/office/debitors/%{partnerNumber}") FIXME
|
||||||
|
|
||||||
return withTitle("Assigning the new new Partner-Relation to the existing Partner", () ->
|
obtain("Partner: Erbengemeinschaft %{nameOfDeceasedPerson}", () ->
|
||||||
httpPatch("/api/hs/office/partners/%{Partner: %{partnerNumber}}", usingJsonBody("""
|
httpPatch("/api/hs/office/partners/%{Partner: %{partnerNumber}}", usingJsonBody("""
|
||||||
{
|
{
|
||||||
"partnerRel": ${Partner-Relation: Erbengemeinschaft %{nameOfDeceasedPerson}}
|
"partnerRel": ${Partner-Relation: Erbengemeinschaft %{nameOfDeceasedPerson}}
|
||||||
@ -85,6 +90,27 @@ public class ReplaceDeceasedPartnerWithCommunityOfHeirs extends UseCase<ReplaceD
|
|||||||
"""))
|
"""))
|
||||||
.expecting(HttpStatus.OK)
|
.expecting(HttpStatus.OK)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// Debitors
|
||||||
|
|
||||||
|
// die Erbengemeinschaft wird als Anchor-Person (Partner) in die Debitor-Relations eingetragen
|
||||||
|
// der neue Rechnungsempfänger (z.B. auch ggf. Rechtsanwalt) wird als Holder-Person (Debitor-Person) in die Debitor-Relations eingetragen -- oder neu?
|
||||||
|
|
||||||
|
// Membership
|
||||||
|
|
||||||
|
// intro: die Mitgliedschaft geht juristisch gesehen auf die Erbengemeinschaft über
|
||||||
|
|
||||||
|
// die bisherige Mitgliedschaft als DECEASED mit Ende-Datum=Todesdatum markieren
|
||||||
|
|
||||||
|
// eine neue Mitgliedschaft (-00) mit dem Start-Datum=Todesdatum+1 anlegen
|
||||||
|
|
||||||
|
// die Geschäftsanteile per share-tx: TRANSFER→ADOPT an die Erbengemeinschaft übertragen
|
||||||
|
// die Geschäftsguthaben per asset-tx: TRANSFER→ADOPT an die Erbengemeinschaft übertragen
|
||||||
|
|
||||||
|
// outro: die Erbengemeinschaft hat eine Frist von 6 Monaten, um die Mitgliedschaft einer Person zu übertragen
|
||||||
|
// →nächster "Drecksfall"
|
||||||
|
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -95,5 +121,7 @@ public class ReplaceDeceasedPartnerWithCommunityOfHeirs extends UseCase<ReplaceD
|
|||||||
.expecting(OK).expecting(JSON).expectObject(),
|
.expecting(OK).expecting(JSON).expectObject(),
|
||||||
path("partnerRel.holder.tradeName").contains("Erbengemeinschaft %{nameOfDeceasedPerson}")
|
path("partnerRel.holder.tradeName").contains("Erbengemeinschaft %{nameOfDeceasedPerson}")
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// verify ex-partner relation
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user