adjust naming in CoopAssets regarding reverseEntry->revertedAssetTx

This commit is contained in:
Michael Hoennig 2024-11-13 09:29:58 +01:00
parent faf654e499
commit 9feef02a17
5 changed files with 7 additions and 7 deletions

View File

@ -128,9 +128,9 @@ public class HsOfficeCoopAssetsTransactionController implements HsOfficeCoopAsse
}
final BiConsumer<HsOfficeCoopAssetsTransactionInsertResource, HsOfficeCoopAssetsTransactionEntity> RESOURCE_TO_ENTITY_POSTMAPPER = (resource, entity) -> {
if ( resource.getReverseEntryUuid() != null ) {
entity.setRevertedAssetTx(coopAssetsTransactionRepo.findByUuid(resource.getReverseEntryUuid())
.orElseThrow(() -> new EntityNotFoundException("ERROR: [400] reverseEntityUuid %s not found".formatted(resource.getReverseEntryUuid()))));
if ( resource.getRevertedAssetTxUuid() != null ) {
entity.setRevertedAssetTx(coopAssetsTransactionRepo.findByUuid(resource.getRevertedAssetTxUuid())
.orElseThrow(() -> new EntityNotFoundException("ERROR: [400] reverseEntityUuid %s not found".formatted(resource.getRevertedAssetTxUuid()))));
}
};
};

View File

@ -80,7 +80,7 @@ components:
maxLength: 48
comment:
type: string
reverseEntry.uuid: # FIXME: rename to revertedAssetTx
revertedAssetTx.uuid:
type: string
format: uuid
required:

View File

@ -243,7 +243,7 @@ class HsOfficeCoopAssetsTransactionControllerAcceptanceTest extends ContextBased
"valueDate": "2022-10-30",
"reference": "test ref reversal",
"comment": "some coop assets reversal transaction",
"reverseEntry.uuid": "%s"
"revertedAssetTx.uuid": "%s"
}
""".formatted(
givenMembership.getUuid(),

View File

@ -41,7 +41,7 @@ class HsOfficeCoopAssetsTransactionEntityUnitTest {
}
@Test
void toStringWithReverseEntryContainsReverseEntry() {
void toStringWithRevertedAssetTxContainsRevertedAssetTx() {
givenCoopAssetTransaction.setRevertedAssetTx(givenCoopAssetReversalTransaction);
final var result = givenCoopAssetTransaction.toString();

View File

@ -40,7 +40,7 @@ class HsOfficeCoopSharesTransactionEntityUnitTest {
}
@Test
void toStringWithReverseEntryContainsReverseEntry() {
void toStringWithRevertedAssetTxContainsRevertedAssetTx() {
givenCoopSharesTransaction.setRevertedShareTx(givenCoopShareReversalTransaction);
final var result = givenCoopSharesTransaction.toString();