add advanced scenario-tests for coop-assets #123

Merged
hsh-michaelhoennig merged 24 commits from feature/add-advanced-scenario-tests-for-coop-assets into master 2024-11-25 16:06:26 +01:00
Showing only changes of commit defaa8665c - Show all commits

View File

@ -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)