http-get endpoints for partner, debitor and memberhip-number #135

Merged
4 changed files with 10 additions and 11 deletions
Showing only changes of commit 5711293103 - Show all commits

View File

@ -17,9 +17,9 @@ public class CreateSepaMandateForDebitor extends UseCase<CreateSepaMandateForDeb
protected HttpResponse run() {
obtain("Debitor: Test AG - main debitor", () ->
httpGet("/api/hs/office/debitors?debitorNumber=&{debitorNumber}")
httpGet("/api/hs/office/debitors/%{debitorNumber}")
.expecting(OK).expecting(JSON),
response -> response.expectArrayElements(1).getFromBody("[0].uuid")
response -> response.getFromBody("uuid")
);
obtain("BankAccount: Test AG - debit bank account", () ->

View File

@ -18,9 +18,8 @@ public class CancelMembership extends UseCase<CancelMembership> {
protected HttpResponse run() {
obtain("Membership: %{memberNumber}", () ->
httpGet("/api/hs/office/memberships?memberNumber=%{memberNumber}")
.expectArrayElements(1),
response -> response.expectArrayElements(1).getFromBody("[0].uuid")
httpGet("/api/hs/office/memberships/%{memberNumber}"),
response -> response.getFromBody("uuid")
);
return withTitle("Patch the New Status Into the Membership", () ->

View File

@ -18,9 +18,9 @@ public abstract class CreateCoopAssetsTransaction extends UseCase<CreateCoopAsse
protected HttpResponse run() {
obtain("#{Find }membershipUuid", () ->
httpGet("/api/hs/office/memberships?memberNumber=&{memberNumber}")
.expecting(OK).expecting(JSON).expectArrayElements(1),
response -> response.getFromBody("$[0].uuid")
httpGet("/api/hs/office/memberships/%{memberNumber}")
.expecting(OK).expecting(JSON),
response -> response.getFromBody("uuid")
);
return withTitle("Create the Coop-Assets-%{transactionType} Transaction", () ->

View File

@ -18,9 +18,9 @@ public abstract class CreateCoopSharesTransaction extends UseCase<CreateCoopShar
protected HttpResponse run() {
obtain("#{Find }membershipUuid", () ->
httpGet("/api/hs/office/memberships?memberNumber=&{memberNumber}")
.expecting(OK).expecting(JSON).expectArrayElements(1),
response -> response.getFromBody("$[0].uuid")
httpGet("/api/hs/office/memberships/%{memberNumber}")
.expecting(OK).expecting(JSON),
response -> response.getFromBody("uuid")
);
return withTitle("Create the Coop-Shares-%{transactionType} Transaction", () ->