OfficeScenarioTests CoopShares+Assets #121
@ -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()))));
|
||||
}
|
||||
};
|
||||
};
|
||||
|
@ -80,7 +80,7 @@ components:
|
||||
maxLength: 48
|
||||
comment:
|
||||
type: string
|
||||
reverseEntry.uuid: # FIXME: rename to revertedAssetTx
|
||||
revertedAssetTx.uuid:
|
||||
type: string
|
||||
format: uuid
|
||||
required:
|
||||
|
@ -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(),
|
||||
|
@ -41,7 +41,7 @@ class HsOfficeCoopAssetsTransactionEntityUnitTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
void toStringWithReverseEntryContainsReverseEntry() {
|
||||
void toStringWithRevertedAssetTxContainsRevertedAssetTx() {
|
||||
givenCoopAssetTransaction.setRevertedAssetTx(givenCoopAssetReversalTransaction);
|
||||
|
||||
final var result = givenCoopAssetTransaction.toString();
|
||||
|
@ -40,7 +40,7 @@ class HsOfficeCoopSharesTransactionEntityUnitTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
void toStringWithReverseEntryContainsReverseEntry() {
|
||||
void toStringWithRevertedAssetTxContainsRevertedAssetTx() {
|
||||
givenCoopSharesTransaction.setRevertedShareTx(givenCoopShareReversalTransaction);
|
||||
|
||||
final var result = givenCoopSharesTransaction.toString();
|
||||
|
Loading…
Reference in New Issue
Block a user