From 11f6a895f292eb714894c9046da3c50b9b09b7b4 Mon Sep 17 00:00:00 2001 From: Michael Hoennig Date: Wed, 13 Nov 2024 14:22:10 +0100 Subject: [PATCH] add introductory text for partner as client --- .../hsadminng/hs/office/scenarios/UseCase.java | 9 +++++++++ .../hs/office/scenarios/partner/CreatePartner.java | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) 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 8850edcc..5867146a 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 @@ -51,6 +51,7 @@ public abstract class UseCase> { private final Map givenProperties = new LinkedHashMap<>(); private String nextTitle; // just temporary to override resultAlias for sub-use-cases + private String introduction; public UseCase(final ScenarioTest testSuite) { this(testSuite, getResultAliasFromProducesAnnotationInCallStack()); @@ -72,6 +73,9 @@ public abstract class UseCase> { } public final HttpResponse doRun() { + if (introduction != null) { + testReport.printPara(introduction); + } testReport.printPara("### Given Properties"); testReport.printLine(""" | name | value | @@ -96,6 +100,11 @@ public abstract class UseCase> { protected void verify(final HttpResponse response) { } + public UseCase introduction(final String introduction) { + this.introduction = introduction; + return this; + } + public final UseCase given(final String propName, final Object propValue) { givenProperties.put(propName, propValue); ScenarioTest.putProperty(propName, propValue); 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 731e1151..3896bbf6 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 @@ -17,7 +17,7 @@ public class CreatePartner extends UseCase { public CreatePartner(final ScenarioTest testSuite) { super(testSuite); - // FIXME: Anmerkung, dass alle Partner Kunden sind + introduction("A partner can be a client or a vendor, currently we only use them for clients."); } @Override