From 9fa5bd96d65453e9d54a7a84c161279cbe38d36d Mon Sep 17 00:00:00 2001 From: Michael Hoennig Date: Tue, 17 Dec 2024 10:37:16 +0100 Subject: [PATCH] remove UseCase from Alias --- .../net/hostsharing/hsadminng/hs/scenarios/ScenarioTest.java | 3 +-- .../java/net/hostsharing/hsadminng/hs/scenarios/UseCase.java | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/test/java/net/hostsharing/hsadminng/hs/scenarios/ScenarioTest.java b/src/test/java/net/hostsharing/hsadminng/hs/scenarios/ScenarioTest.java index b65c8ca7..0b33ccec 100644 --- a/src/test/java/net/hostsharing/hsadminng/hs/scenarios/ScenarioTest.java +++ b/src/test/java/net/hostsharing/hsadminng/hs/scenarios/ScenarioTest.java @@ -50,7 +50,7 @@ public abstract class ScenarioTest extends ContextBasedTest { return Optional.of(currentTestMethodProduces.pop()); } - public record Alias>(Class useCase, UUID uuid) { + public record Alias>(UUID uuid) { @Override public String toString() { @@ -117,7 +117,6 @@ public abstract class ScenarioTest extends ContextBasedTest { putAlias( "Person: Hostsharing eG", new Alias<>( - null, personRepo.findPersonByOptionalNameLike("Hostsharing eG") .stream() .map(HsOfficePersonRbacEntity::getUuid) diff --git a/src/test/java/net/hostsharing/hsadminng/hs/scenarios/UseCase.java b/src/test/java/net/hostsharing/hsadminng/hs/scenarios/UseCase.java index b4f38fa1..095fe8b5 100644 --- a/src/test/java/net/hostsharing/hsadminng/hs/scenarios/UseCase.java +++ b/src/test/java/net/hostsharing/hsadminng/hs/scenarios/UseCase.java @@ -306,14 +306,14 @@ public abstract class UseCase> { final var value = extractor.apply(this); ScenarioTest.putAlias( alias, - new ScenarioTest.Alias<>(UseCase.this.getClass(), UUID.fromString(value))); + new ScenarioTest.Alias<>(UUID.fromString(value))); return this; } public HttpResponse keepAs(final String alias) { ScenarioTest.putAlias( nonNullAlias(alias), - new ScenarioTest.Alias<>(UseCase.this.getClass(), locationUuid)); + new ScenarioTest.Alias<>(locationUuid)); return this; }