OfficeScenarioTests CoopShares+Assets #121

Merged
hsh-michaelhoennig merged 39 commits from feature/use-case-acceptance-tests-4 into master 2024-11-15 11:54:19 +01:00
5 changed files with 7 additions and 7 deletions
Showing only changes of commit 9feef02a17 - Show all commits

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();