diff --git a/src/test/java/net/hostsharing/hsadminng/hs/office/usecases/UseCase.java b/src/test/java/net/hostsharing/hsadminng/hs/office/usecases/UseCase.java index a7ea4b29..607cfcdf 100644 --- a/src/test/java/net/hostsharing/hsadminng/hs/office/usecases/UseCase.java +++ b/src/test/java/net/hostsharing/hsadminng/hs/office/usecases/UseCase.java @@ -8,6 +8,7 @@ import org.apache.commons.collections4.map.LinkedMap; import org.springframework.http.HttpMethod; import org.springframework.http.HttpStatus; +import java.util.LinkedHashMap; import java.util.Map; import java.util.UUID; import java.util.function.Function; @@ -21,6 +22,7 @@ public abstract class UseCase> { private final UseCaseTest testSuite; private final Map>> requirements = new LinkedMap<>(); private final String resultAlias; + private final Map givenProperties = new LinkedHashMap<>(); private String nextTitle; // FIXME: ugly public UseCase(final UseCaseTest testSuite) { @@ -55,7 +57,7 @@ public abstract class UseCase> { | name | value | |------|-------| """.trim()); - UseCaseTest.properties().forEach((key, value) -> log("| " + key + " | " + value + " |")); + givenProperties.forEach((key, value) -> log("| " + key + " | " + value + " |")); log(""); requirements.forEach((alias, factory) -> factory.apply(alias).run().keep()); return run(); @@ -64,6 +66,7 @@ public abstract class UseCase> { protected abstract HttpResponse run(); public final UseCase given(final String propName, final Object propValue) { + givenProperties.put(propName, propValue); UseCaseTest.putProperty(propName, propValue); return this; }