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) -> { final BiConsumer<HsOfficeCoopAssetsTransactionInsertResource, HsOfficeCoopAssetsTransactionEntity> RESOURCE_TO_ENTITY_POSTMAPPER = (resource, entity) -> {
if ( resource.getReverseEntryUuid() != null ) { if ( resource.getRevertedAssetTxUuid() != null ) {
entity.setRevertedAssetTx(coopAssetsTransactionRepo.findByUuid(resource.getReverseEntryUuid()) entity.setRevertedAssetTx(coopAssetsTransactionRepo.findByUuid(resource.getRevertedAssetTxUuid())
.orElseThrow(() -> new EntityNotFoundException("ERROR: [400] reverseEntityUuid %s not found".formatted(resource.getReverseEntryUuid())))); .orElseThrow(() -> new EntityNotFoundException("ERROR: [400] reverseEntityUuid %s not found".formatted(resource.getRevertedAssetTxUuid()))));
} }
}; };
}; };

View File

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

View File

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

View File

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

View File

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