From e82502848146685be372d8685b5a2c54a41fd5c3 Mon Sep 17 00:00:00 2001 From: Michael Hoennig Date: Sat, 13 Apr 2024 13:54:47 +0200 Subject: [PATCH] aftermaths from merging master --- ...resTransactionControllerAcceptanceTest.java | 8 ++------ ...HsOfficeCoopSharesTransactionRawEntity.java | 18 ------------------ .../hs/office/migration/ImportOfficeData.java | 8 ++++---- 3 files changed, 6 insertions(+), 28 deletions(-) delete mode 100644 src/test/java/net/hostsharing/hsadminng/hs/office/coopshares/HsOfficeCoopSharesTransactionRawEntity.java diff --git a/src/test/java/net/hostsharing/hsadminng/hs/office/coopshares/HsOfficeCoopSharesTransactionControllerAcceptanceTest.java b/src/test/java/net/hostsharing/hsadminng/hs/office/coopshares/HsOfficeCoopSharesTransactionControllerAcceptanceTest.java index 9763e62a..bdd9a34a 100644 --- a/src/test/java/net/hostsharing/hsadminng/hs/office/coopshares/HsOfficeCoopSharesTransactionControllerAcceptanceTest.java +++ b/src/test/java/net/hostsharing/hsadminng/hs/office/coopshares/HsOfficeCoopSharesTransactionControllerAcceptanceTest.java @@ -4,8 +4,6 @@ import io.restassured.RestAssured; import io.restassured.http.ContentType; import net.hostsharing.hsadminng.HsadminNgApplication; import net.hostsharing.hsadminng.context.Context; -import net.hostsharing.hsadminng.hs.office.coopassets.HsOfficeCoopAssetsTransactionEntity; -import net.hostsharing.hsadminng.hs.office.coopassets.HsOfficeCoopAssetsTransactionRawEntity; import net.hostsharing.hsadminng.hs.office.membership.HsOfficeMembershipRepository; import net.hostsharing.hsadminng.rbac.test.ContextBasedTestWithCleanup; import net.hostsharing.hsadminng.rbac.test.JpaAttempt; @@ -21,11 +19,9 @@ import org.springframework.transaction.annotation.Transactional; import jakarta.persistence.EntityManager; import jakarta.persistence.PersistenceContext; -import java.math.BigDecimal; import java.time.LocalDate; import java.util.UUID; -import static net.hostsharing.hsadminng.hs.office.coopassets.HsOfficeCoopAssetsTransactionType.DEPOSIT; import static net.hostsharing.hsadminng.rbac.test.IsValidUuidMatcher.isUuidValid; import static net.hostsharing.hsadminng.rbac.test.JsonMatcher.lenientlyEquals; import static org.assertj.core.api.Assertions.assertThat; @@ -210,7 +206,7 @@ class HsOfficeCoopSharesTransactionControllerAcceptanceTest extends ContextBased .reference("test ref") .build()); }).assertSuccessful().assertNotNull().returnedValue(); - toCleanup(HsOfficeCoopSharesTransactionRawEntity.class, givenTransaction.getUuid()); + toCleanup(HsOfficeCoopSharesTransactionEntity.class, givenTransaction.getUuid()); final var location = RestAssured // @formatter:off .given() @@ -259,7 +255,7 @@ class HsOfficeCoopSharesTransactionControllerAcceptanceTest extends ContextBased final var newShareTxUuid = UUID.fromString( location.substring(location.lastIndexOf('/') + 1)); assertThat(newShareTxUuid).isNotNull(); - toCleanup(HsOfficeCoopSharesTransactionRawEntity.class, newShareTxUuid); + toCleanup(HsOfficeCoopSharesTransactionEntity.class, newShareTxUuid); } @Test diff --git a/src/test/java/net/hostsharing/hsadminng/hs/office/coopshares/HsOfficeCoopSharesTransactionRawEntity.java b/src/test/java/net/hostsharing/hsadminng/hs/office/coopshares/HsOfficeCoopSharesTransactionRawEntity.java deleted file mode 100644 index 5ffde127..00000000 --- a/src/test/java/net/hostsharing/hsadminng/hs/office/coopshares/HsOfficeCoopSharesTransactionRawEntity.java +++ /dev/null @@ -1,18 +0,0 @@ - -package net.hostsharing.hsadminng.hs.office.coopshares; - -import jakarta.persistence.Entity; -import jakarta.persistence.Id; -import jakarta.persistence.Table; -import lombok.NoArgsConstructor; - -import java.util.UUID; - -@Entity -@Table(name = "hs_office_coopsharestransaction") -@NoArgsConstructor -public class HsOfficeCoopSharesTransactionRawEntity { - - @Id - private UUID uuid; -} diff --git a/src/test/java/net/hostsharing/hsadminng/hs/office/migration/ImportOfficeData.java b/src/test/java/net/hostsharing/hsadminng/hs/office/migration/ImportOfficeData.java index 206aef1d..74155942 100644 --- a/src/test/java/net/hostsharing/hsadminng/hs/office/migration/ImportOfficeData.java +++ b/src/test/java/net/hostsharing/hsadminng/hs/office/migration/ImportOfficeData.java @@ -360,10 +360,10 @@ public class ImportOfficeData extends ContextBasedTest { assertThat(toFormattedString(coopShares)).isEqualToIgnoringWhitespace(""" { - 33443=CoopShareTransaction(M-1001700, 2000-12-06, SUBSCRIPTION, 20, legacy data import, initial share subscription), - 33451=CoopShareTransaction(M-1002000, 2000-12-06, SUBSCRIPTION, 2, legacy data import, initial share subscription), - 33701=CoopShareTransaction(M-1001700, 2005-01-10, SUBSCRIPTION, 40, legacy data import, increase), - 33810=CoopShareTransaction(M-1002000, 2016-12-31, CANCELLATION, 22, legacy data import, membership ended) + 33443=CoopShareTransaction(M-1001700: 2000-12-06, SUBSCRIPTION, 20, legacy data import, initial share subscription), + 33451=CoopShareTransaction(M-1002000: 2000-12-06, SUBSCRIPTION, 2, legacy data import, initial share subscription), + 33701=CoopShareTransaction(M-1001700: 2005-01-10, SUBSCRIPTION, 40, legacy data import, increase), + 33810=CoopShareTransaction(M-1002000: 2016-12-31, CANCELLATION, 22, legacy data import, membership ended) } """); }