diff --git a/src/test/java/net/hostsharing/hsadminng/hs/office/scenarios/UseCase.java b/src/test/java/net/hostsharing/hsadminng/hs/office/scenarios/UseCase.java index 8cbea0d6..77aa7b93 100644 --- a/src/test/java/net/hostsharing/hsadminng/hs/office/scenarios/UseCase.java +++ b/src/test/java/net/hostsharing/hsadminng/hs/office/scenarios/UseCase.java @@ -196,10 +196,10 @@ public abstract class UseCase> { protected void verify( final String title, final Supplier http, - final Consumer assertion) { + final Consumer... assertions) { withTitle(ScenarioTest.resolve(title), () -> { final var response = http.get(); - assertion.accept(response); + Arrays.stream(assertions).forEach(assertion -> assertion.accept(response)); return response; }); } diff --git a/src/test/java/net/hostsharing/hsadminng/hs/office/scenarios/partner/AddRepresentativeToPartner.java b/src/test/java/net/hostsharing/hsadminng/hs/office/scenarios/partner/AddRepresentativeToPartner.java index 71ebd675..1914cbb3 100644 --- a/src/test/java/net/hostsharing/hsadminng/hs/office/scenarios/partner/AddRepresentativeToPartner.java +++ b/src/test/java/net/hostsharing/hsadminng/hs/office/scenarios/partner/AddRepresentativeToPartner.java @@ -69,7 +69,7 @@ public class AddRepresentativeToPartner extends UseCase httpGet("/api/hs/office/relations?relationType=REPRESENTATIVE&personData=" + uriEncoded("%{representativeFamilyName}")) .expecting(OK).expecting(JSON).expectArrayElements(1), path("[0].contact.caption").contains("%{representativeGivenName} %{representativeFamilyName}") diff --git a/src/test/java/net/hostsharing/hsadminng/hs/office/scenarios/partner/CreatePartner.java b/src/test/java/net/hostsharing/hsadminng/hs/office/scenarios/partner/CreatePartner.java index eb13bd4a..fa952023 100644 --- a/src/test/java/net/hostsharing/hsadminng/hs/office/scenarios/partner/CreatePartner.java +++ b/src/test/java/net/hostsharing/hsadminng/hs/office/scenarios/partner/CreatePartner.java @@ -78,8 +78,7 @@ public class CreatePartner extends UseCase { verify( "Verify the New Partner Relation", () -> httpGet("/api/hs/office/relations?relationType=PARTNER&personData=" + uriEncoded("%{%{tradeName???}???%{givenName???} %{familyName???}}")) - .expecting(OK).expecting(JSON).expectArrayElements(1), - path("[0].contact.caption").contains("%{contactCaption}") + .expecting(OK).expecting(JSON).expectArrayElements(1) ); } } diff --git a/src/test/java/net/hostsharing/hsadminng/hs/office/scenarios/subscription/RemoveOperationsContactFromPartner.java b/src/test/java/net/hostsharing/hsadminng/hs/office/scenarios/subscription/RemoveOperationsContactFromPartner.java index 8989cb0d..0b199a55 100644 --- a/src/test/java/net/hostsharing/hsadminng/hs/office/scenarios/subscription/RemoveOperationsContactFromPartner.java +++ b/src/test/java/net/hostsharing/hsadminng/hs/office/scenarios/subscription/RemoveOperationsContactFromPartner.java @@ -25,11 +25,19 @@ public class RemoveOperationsContactFromPartner extends UseCase + return withTitle("Delete the Contact", () -> httpDelete("/api/hs/office/relations/&{Operations-Contact: %{operationsContactPerson}}") .expecting(NO_CONTENT) ); + } - return null; + @Override + protected void verify() { + verify( + "Verify the New OPERATIONS Relation", + () -> httpGet("/api/hs/office/relations?relationType=OPERATIONS&personData=" + uriEncoded( + "%{operationsContactFamilyName}")) + .expecting(OK).expecting(JSON).expectArrayElements(0) + ); } }