OfficeScenarioTests CoopShares+Assets #121

Merged
hsh-michaelhoennig merged 39 commits from feature/use-case-acceptance-tests-4 into master 2024-11-15 11:54:19 +01:00
9 changed files with 24 additions and 24 deletions
Showing only changes of commit 1f19bbbcac - Show all commits

View File

@ -47,7 +47,7 @@ public class ReplaceContactData extends UseCase<ReplaceContactData> {
withTitle("Replace the Contact-Reference in the Partner-Relation", () -> withTitle("Replace the Contact-Reference in the Partner-Relation", () ->
httpPatch("/api/hs/office/relations/%{partnerRelationUuid}", usingJsonBody(""" httpPatch("/api/hs/office/relations/%{partnerRelationUuid}", usingJsonBody("""
{ {
"contactUuid": ${Contact: %{newContactCaption}} "contact.uuid": ${Contact: %{newContactCaption}}
} }
""")) """))
.expecting(OK) .expecting(OK)

View File

@ -55,9 +55,9 @@ public class CreateExternalDebitorForPartner extends UseCase<CreateExternalDebit
return httpPost("/api/hs/office/debitors", usingJsonBody(""" return httpPost("/api/hs/office/debitors", usingJsonBody("""
{ {
"debitorRel": { "debitorRel": {
"anchorUuid": ${Person: %{partnerPersonTradeName}}, "anchor.uuid": ${Person: %{partnerPersonTradeName}},
"holderUuid": ${Person: Billing GmbH}, "holder.uuid": ${Person: Billing GmbH},
"contactUuid": ${Contact: Billing GmbH - Test AG billing} "contact.uuid": ${Contact: Billing GmbH - Test AG billing}
}, },
"debitorNumberSuffix": ${debitorNumberSuffix}, "debitorNumberSuffix": ${debitorNumberSuffix},
"billable": ${billable}, "billable": ${billable},
@ -65,7 +65,7 @@ public class CreateExternalDebitorForPartner extends UseCase<CreateExternalDebit
"vatCountryCode": ${vatCountryCode}, "vatCountryCode": ${vatCountryCode},
"vatBusiness": ${vatBusiness}, "vatBusiness": ${vatBusiness},
"vatReverseCharge": ${vatReverseCharge}, "vatReverseCharge": ${vatReverseCharge},
"refundBankAccountUuid": ${BankAccount: Billing GmbH - refund bank account}, "refundBankAccount.uuid": ${BankAccount: Billing GmbH - refund bank account},
"defaultPrefix": ${defaultPrefix} "defaultPrefix": ${defaultPrefix}
} }
""")) """))

View File

@ -48,9 +48,9 @@ public class CreateSelfDebitorForPartner extends UseCase<CreateSelfDebitorForPar
return httpPost("/api/hs/office/debitors", usingJsonBody(""" return httpPost("/api/hs/office/debitors", usingJsonBody("""
{ {
"debitorRel": { "debitorRel": {
"anchorUuid": ${partnerPersonUuid}, "anchor.uuid": ${partnerPersonUuid},
"holderUuid": ${partnerPersonUuid}, "holder.uuid": ${partnerPersonUuid},
"contactUuid": ${Contact: Test AG - billing department} "contact.uuid": ${Contact: Test AG - billing department}
}, },
"debitorNumberSuffix": ${debitorNumberSuffix}, "debitorNumberSuffix": ${debitorNumberSuffix},
"billable": ${billable}, "billable": ${billable},
@ -58,7 +58,7 @@ public class CreateSelfDebitorForPartner extends UseCase<CreateSelfDebitorForPar
"vatCountryCode": ${vatCountryCode}, "vatCountryCode": ${vatCountryCode},
"vatBusiness": ${vatBusiness}, "vatBusiness": ${vatBusiness},
"vatReverseCharge": ${vatReverseCharge}, "vatReverseCharge": ${vatReverseCharge},
"refundBankAccountUuid": ${BankAccount: Test AG - refund bank account}, "refundBankAccount.uuid": ${BankAccount: Test AG - refund bank account},
"defaultPrefix": ${defaultPrefix} "defaultPrefix": ${defaultPrefix}
} }
""")) """))

View File

@ -35,8 +35,8 @@ public class CreateSepaMandateForDebitor extends UseCase<CreateSepaMandateForDeb
return httpPost("/api/hs/office/sepamandates", usingJsonBody(""" return httpPost("/api/hs/office/sepamandates", usingJsonBody("""
{ {
"debitorUuid": ${Debitor: Test AG - main debitor}, "debitor.uuid": ${Debitor: Test AG - main debitor},
"bankAccountUuid": ${BankAccount: Test AG - debit bank account}, "bankAccount.uuid": ${BankAccount: Test AG - debit bank account},
"reference": ${mandateReference}, "reference": ${mandateReference},
"agreement": ${mandateAgreement}, "agreement": ${mandateAgreement},
"validFrom": ${mandateValidFrom} "validFrom": ${mandateValidFrom}

View File

@ -18,7 +18,7 @@ public class CreateMembership extends UseCase<CreateMembership> {
protected HttpResponse run() { protected HttpResponse run() {
return httpPost("/api/hs/office/memberships", usingJsonBody(""" return httpPost("/api/hs/office/memberships", usingJsonBody("""
{ {
"partnerUuid": ${Partner: Test AG}, "partner.uuid": ${Partner: Test AG},
"memberNumberSuffix": ${memberNumberSuffix}, "memberNumberSuffix": ${memberNumberSuffix},
"status": "ACTIVE", "status": "ACTIVE",
"validFrom": ${validFrom}, "validFrom": ${validFrom},

View File

@ -57,9 +57,9 @@ public class AddOperationsContactToPartner extends UseCase<AddOperationsContactT
return httpPost("/api/hs/office/relations", usingJsonBody(""" return httpPost("/api/hs/office/relations", usingJsonBody("""
{ {
"type": "OPERATIONS", "type": "OPERATIONS",
"anchorUuid": ${Person: %{partnerPersonTradeName}}, "anchor.uuid": ${Person: %{partnerPersonTradeName}},
"holderUuid": ${Person: %{operationsContactGivenName} %{operationsContactFamilyName}}, "holder.uuid": ${Person: %{operationsContactGivenName} %{operationsContactFamilyName}},
"contactUuid": ${Contact: %{operationsContactGivenName} %{operationsContactFamilyName}} "contact.uuid": ${Contact: %{operationsContactGivenName} %{operationsContactFamilyName}}
} }
""")) """))
.expecting(CREATED).expecting(JSON); .expecting(CREATED).expecting(JSON);

View File

@ -60,9 +60,9 @@ public class AddRepresentativeToPartner extends UseCase<AddRepresentativeToPartn
return httpPost("/api/hs/office/relations", usingJsonBody(""" return httpPost("/api/hs/office/relations", usingJsonBody("""
{ {
"type": "REPRESENTATIVE", "type": "REPRESENTATIVE",
"anchorUuid": ${Person: %{partnerPersonTradeName}}, "anchor.uuid": ${Person: %{partnerPersonTradeName}},
"holderUuid": ${Person: %{representativeGivenName} %{representativeFamilyName}}, "holder.uuid": ${Person: %{representativeGivenName} %{representativeFamilyName}},
"contactUuid": ${Contact: %{representativeGivenName} %{representativeFamilyName}} "contact.uuid": ${Contact: %{representativeGivenName} %{representativeFamilyName}}
} }
""")) """))
.expecting(CREATED).expecting(JSON); .expecting(CREATED).expecting(JSON);

View File

@ -62,9 +62,9 @@ public class CreatePartner extends UseCase<CreatePartner> {
{ {
"partnerNumber": ${partnerNumber}, "partnerNumber": ${partnerNumber},
"partnerRel": { "partnerRel": {
"anchorUuid": ${Person: Hostsharing eG}, "anchor.uuid": ${Person: Hostsharing eG},
"holderUuid": ${Person: %{%{tradeName???}???%{givenName???} %{familyName???}}}, "holder.uuid": ${Person: %{%{tradeName???}???%{givenName???} %{familyName???}}},
"contactUuid": ${Contact: %{contactCaption}} "contact.uuid": ${Contact: %{contactCaption}}
}, },
"details": { "details": {
"registrationOffice": "Registergericht Hamburg", "registrationOffice": "Registergericht Hamburg",

View File

@ -52,9 +52,9 @@ public class SubscribeToMailinglist extends UseCase<SubscribeToMailinglist> {
{ {
"type": "SUBSCRIBER", "type": "SUBSCRIBER",
"mark": ${mailingList}, "mark": ${mailingList},
"anchorUuid": ${Person: %{partnerPersonTradeName}}, "anchor.uuid": ${Person: %{partnerPersonTradeName}},
"holderUuid": ${Person: %{subscriberGivenName} %{subscriberFamilyName}}, "holder.uuid": ${Person: %{subscriberGivenName} %{subscriberFamilyName}},
"contactUuid": ${Contact: %{subscriberGivenName} %{subscriberFamilyName}} "contact.uuid": ${Contact: %{subscriberGivenName} %{subscriberFamilyName}}
} }
""")) """))
.expecting(CREATED).expecting(JSON); .expecting(CREATED).expecting(JSON);