FINERACT-2277: Deprecate findExistingReversedTransactionIds and fetch only the ids from database instead
This commit is contained in:
committed by
Adam Saghy
parent
13e4c8b55d
commit
8b86229a3e
+2
-2
@@ -235,7 +235,7 @@ class LoanAdjustmentServiceImplTest {
|
||||
|
||||
// Mock methods called inside adjustExistingTransaction
|
||||
when(loanTransactionRepository.findTransactionIdsByLoan(loan)).thenReturn(Collections.emptyList());
|
||||
when(loan.findExistingReversedTransactionIds()).thenReturn(Collections.emptyList());
|
||||
when(loanTransactionRepository.findReversedTransactionIdsByLoan(loan)).thenReturn(Collections.emptyList());
|
||||
doNothing().when(loanTransactionValidator).validateActivityNotBeforeClientOrGroupTransferDate(any(), any(), any());
|
||||
when(loan.isClosedWrittenOff()).thenReturn(false);
|
||||
when(newTransactionDetail.isRepaymentLikeType()).thenReturn(true);
|
||||
@@ -280,7 +280,7 @@ class LoanAdjustmentServiceImplTest {
|
||||
|
||||
// Mock methods called inside adjustExistingTransaction
|
||||
when(loanTransactionRepository.findTransactionIdsByLoan(loan)).thenReturn(Collections.emptyList());
|
||||
when(loan.findExistingReversedTransactionIds()).thenReturn(Collections.emptyList());
|
||||
when(loanTransactionRepository.findReversedTransactionIdsByLoan(loan)).thenReturn(Collections.emptyList());
|
||||
doNothing().when(loanTransactionValidator).validateActivityNotBeforeClientOrGroupTransferDate(any(), any(), any());
|
||||
when(loan.isClosedWrittenOff()).thenReturn(false);
|
||||
when(newTransactionDetail.isRepaymentLikeType()).thenReturn(true);
|
||||
|
||||
+1
-1
@@ -193,7 +193,7 @@ class LoanChargeWritePlatformServiceImplTest {
|
||||
List<Long> existingTransactionIds = new ArrayList<>();
|
||||
List<Long> existingReversedTransactionIds = new ArrayList<>();
|
||||
when(loanTransactionRepository.findTransactionIdsByLoan(loan)).thenReturn(existingTransactionIds);
|
||||
when(loan.findExistingReversedTransactionIds()).thenReturn(existingReversedTransactionIds);
|
||||
when(loanTransactionRepository.findReversedTransactionIdsByLoan(loan)).thenReturn(existingReversedTransactionIds);
|
||||
|
||||
when(loan.getLoanCharges()).thenReturn(new HashSet<>());
|
||||
when(loan.getDisbursementDate()).thenReturn(LocalDate.now(ZoneId.systemDefault()));
|
||||
|
||||
Reference in New Issue
Block a user