From defaa8665c694359f315feb8f732fbe4d5dd8fe1 Mon Sep 17 00:00:00 2001 From: Michael Hoennig Date: Thu, 21 Nov 2024 12:39:26 +0100 Subject: [PATCH] scenario-Test shouldRevertCoopAssetsTransfer with IgnoreOnFailure --- .../scenarios/HsOfficeScenarioTests.java | 24 +++++++++++++++---- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/src/test/java/net/hostsharing/hsadminng/hs/office/scenarios/HsOfficeScenarioTests.java b/src/test/java/net/hostsharing/hsadminng/hs/office/scenarios/HsOfficeScenarioTests.java index 7adc6805..dec419f0 100644 --- a/src/test/java/net/hostsharing/hsadminng/hs/office/scenarios/HsOfficeScenarioTests.java +++ b/src/test/java/net/hostsharing/hsadminng/hs/office/scenarios/HsOfficeScenarioTests.java @@ -30,12 +30,15 @@ import net.hostsharing.hsadminng.hs.office.scenarios.subscription.RemoveOperatio import net.hostsharing.hsadminng.hs.office.scenarios.subscription.SubscribeToMailinglist; import net.hostsharing.hsadminng.hs.office.scenarios.subscription.UnsubscribeFromMailinglist; import net.hostsharing.hsadminng.rbac.test.JpaAttempt; +import net.hostsharing.hsadminng.test.IgnoreOnFailure; +import net.hostsharing.hsadminng.test.IgnoreOnFailureExtension; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.MethodOrderer; import org.junit.jupiter.api.Order; import org.junit.jupiter.api.Tag; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.TestMethodOrder; +import org.junit.jupiter.api.extension.ExtendWith; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.test.annotation.DirtiesContext; @@ -52,6 +55,7 @@ import org.springframework.test.annotation.DirtiesContext; ) @DirtiesContext @TestMethodOrder(MethodOrderer.OrderAnnotation.class) +@ExtendWith(IgnoreOnFailureExtension.class) class HsOfficeScenarioTests extends ScenarioTest { @Test @@ -399,7 +403,7 @@ class HsOfficeScenarioTests extends ScenarioTest { } @Test - @Order(4302) + @Order(4303) @Requires("Coop-Assets M-3101000 - Test AG - DEPOSIT Transaction") @Produces("Coop-Assets M-3101000 - Test AG - DISBURSAL Transaction") void shouldDisburseCoopAssets() { @@ -413,21 +417,31 @@ class HsOfficeScenarioTests extends ScenarioTest { } @Test - @Order(4303) + @Order(4304) @Requires("Coop-Assets M-3101000 - Test AG - DEPOSIT Transaction") @Produces("Coop-Assets M-3101000 - Test AG - TRANSFER Transaction") void shouldTransferCoopAssets() { new CreateCoopAssetsTransferTransaction(this) .given("transferringMemberNumber", "M-3101000") .given("adoptingMemberNumber", "M-4303000") - .given("reference", "transfer 2024-01-15") + .given("reference", "transfer 2024-12-31") .given("valueToDisburse", 2 * 64) .given("comment", "transfer assets from M-3101000 to M-4303000") - .given("transactionDate", "2024-02-15") + .given("transactionDate", "2024-12-31") .doRun(); } - // FIXME: implement revert for an asset TRANSFER tx + @Test + @Order(4305) + @Requires("Coop-Assets M-3101000 - Test AG - TRANSFER Transaction") + @IgnoreOnFailure("TODO.impl: reverting transfers is not implemented yet") + void shouldRevertCoopAssetsTransfer() { + new CreateCoopAssetsRevertTransaction(this) + .given("memberNumber", "M-3101000") + .given("comment", "reverting some incorrect transfer transaction") + .given("dateOfIncorrectTransaction", "2024-02-15") + .doRun(); + } @Test @Order(4900)