feature/use-case-acceptance-tests #116

Merged
hsh-michaelhoennig merged 49 commits from feature/use-case-acceptance-tests into master 2024-10-30 11:40:46 +01:00
6 changed files with 15 additions and 51 deletions
Showing only changes of commit 6817219553 - Show all commits

View File

@ -172,7 +172,7 @@ class HsOfficeScenarioTests extends ScenarioTest {
@Requires("Debitor: Test AG - main debitor")
@Produces("SEPA-Mandate: Test AG")
void shouldCreateSepaMandateForDebitor() {
new CreateSepaMandataForDebitor(this)
new CreateSepaMandateForDebitor(this)
.given("debitor", "Test AG")
.given("memberNumberSuffix", "00")
.given("validFrom", "2024-10-15")
@ -195,7 +195,7 @@ class HsOfficeScenarioTests extends ScenarioTest {
@Order(3109)
@Requires("SEPA-Mandate: Test AG")
void shouldDeleteSepaMandateForDebitor() {
new DeleteSepaMandataForDebitor(this)
new DeleteSepaMandateForDebitor(this)
.given("sepaMandateUuid", "%{SEPA-Mandate: Test AG}")
.doRun();
}

View File

@ -1,34 +0,0 @@
package net.hostsharing.hsadminng.hs.office.scenarios;
import java.lang.invoke.SerializedLambda;
import java.lang.reflect.Method;
import java.util.function.Consumer;
public class MethodReferenceExample {
public static void myMethod(String input) {
System.out.println("Hello from myMethod, input: " + input);
}
public static void main(String[] args) {
// Create a method reference
Consumer<String> methodRef = MethodReferenceExample::myMethod;
// Use reflection to retrieve method reference info
try {
// Step 1: Get the method 'writeReplace' via reflection
Method writeReplace = methodRef.getClass().getDeclaredMethod("writeReplace");
writeReplace.setAccessible(true);
// Step 2: Invoke 'writeReplace' to get a SerializedLambda
SerializedLambda serializedLambda = (SerializedLambda) writeReplace.invoke(methodRef);
// Step 3: Get the method name using the SerializedLambda
String methodName = serializedLambda.getImplMethodName();
System.out.println("Original method name: " + methodName);
} catch (Exception e) {
e.printStackTrace();
}
}
}

View File

@ -86,7 +86,6 @@ public class TemplateResolver {
throw new IllegalStateException("no more characters. resolved so far: " + resolved);
}
final var currentChar = currentChar();
//System.out.println("fetched #" + position + ": " + currentChar);
++position;
return currentChar;
}

View File

@ -6,9 +6,9 @@ import net.hostsharing.hsadminng.hs.office.scenarios.ScenarioTest;
import static io.restassured.http.ContentType.JSON;
import static org.springframework.http.HttpStatus.CREATED;
public class CreateSepaMandataForDebitor extends UseCase<CreateSepaMandataForDebitor> {
public class CreateSepaMandateForDebitor extends UseCase<CreateSepaMandateForDebitor> {
public CreateSepaMandataForDebitor(final ScenarioTest testSuite) {
public CreateSepaMandateForDebitor(final ScenarioTest testSuite) {
super(testSuite);
}

View File

@ -5,9 +5,9 @@ import net.hostsharing.hsadminng.hs.office.scenarios.ScenarioTest;
import org.springframework.http.HttpStatus;
public class DeleteSepaMandataForDebitor extends UseCase<DeleteSepaMandataForDebitor> {
public class DeleteSepaMandateForDebitor extends UseCase<DeleteSepaMandateForDebitor> {
public DeleteSepaMandataForDebitor(final ScenarioTest testSuite) {
public DeleteSepaMandateForDebitor(final ScenarioTest testSuite) {
super(testSuite);
}

View File

@ -25,8 +25,7 @@ public class AddOperationsContactToPartner extends UseCase<AddOperationsContactT
"In production data this query could result in multiple outputs. In that case, you have to find out which is the right one."
);
obtain("Person: %{operationsContactGivenName} %{operationsContactFamilyName}",
() ->
obtain("Person: %{operationsContactGivenName} %{operationsContactFamilyName}", () ->
httpPost("/api/hs/office/persons", usingJsonBody("""
{
"personType": "NATURAL_PERSON",