fix CreateSelfDebitorForPartner
This commit is contained in:
parent
887ec588b6
commit
4911ca54c0
@ -55,7 +55,7 @@ public abstract class UseCase<T extends UseCase<?>> {
|
||||
}
|
||||
|
||||
public final HttpResponse doRun() {
|
||||
requirements.forEach((alias, factpory) -> factpory.apply(alias).run());
|
||||
requirements.forEach((alias, factory) -> factory.apply(alias).run().keep());
|
||||
return run();
|
||||
}
|
||||
|
||||
|
@ -20,8 +20,11 @@ import java.lang.reflect.Method;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.UUID;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
public abstract class UseCaseTest extends ContextBasedTest {
|
||||
|
||||
final static String RUN_AS_USER = "superuser-alex@hostsharing.net"; // TODO.test: use global:AGENT when implemented
|
||||
@ -85,8 +88,12 @@ public abstract class UseCaseTest extends ContextBasedTest {
|
||||
return aliases.containsKey(alias);
|
||||
}
|
||||
|
||||
static Alias<?> getAlias(final String alias) {
|
||||
return aliases.get(alias);
|
||||
static Alias<?> getAlias(final String name) {
|
||||
final var alias = aliases.get(name);
|
||||
assertThat(alias).as("alias '" + name + "' not found in aliases [" +
|
||||
aliases.keySet().stream().map(v -> "'" + v + "'").collect(Collectors.joining(", ")) + "]"
|
||||
).isNotNull();
|
||||
return alias;
|
||||
}
|
||||
|
||||
static void putAlias(final String name, final Alias<?> value) {
|
||||
|
@ -43,8 +43,8 @@ public class CreateSelfDebitorForPartner extends UseCase<CreateSelfDebitorForPar
|
||||
{
|
||||
"debitorRel": {
|
||||
"type": "DEBITOR", // FIXME: should be defaulted to DEBITOR
|
||||
"anchorUuid": ${person:Test AG.uuid},
|
||||
"holderUuid": ${person:Test AG.uuid},
|
||||
"anchorUuid": ${Person: Test AG},
|
||||
"holderUuid": ${Person: Test AG},
|
||||
"contactUuid": ${Contact: Test AG - billing department}
|
||||
},
|
||||
"debitorNumberSuffix": "00",
|
||||
|
Loading…
Reference in New Issue
Block a user