[FINERACT-1678] Exclude loan IDs from execution context
This commit is contained in:
+1
-1
@@ -71,7 +71,7 @@ public class ApplyLoanLockTaskletStepDefinitions implements En {
|
||||
StepExecution stepExecution = new StepExecution("test", null);
|
||||
ExecutionContext executionContext = new ExecutionContext();
|
||||
executionContext.put(LoanCOBConstant.LOAN_COB_PARAMETER, new LoanCOBParameter(1L, 4L));
|
||||
lenient().when(this.loanRepository.findAllNonClosedLoansBehindOrNullByMinAndMaxLoanId(anyLong(), anyLong(), any()))
|
||||
lenient().when(this.loanRepository.findAllNonClosedLoansByLastClosedBusinessDateAndMinAndMaxLoanId(anyLong(), anyLong(), any()))
|
||||
.thenReturn(List.of(1L, 2L, 3L, 4L));
|
||||
stepExecution.setExecutionContext(executionContext);
|
||||
this.stepContribution = new StepContribution(stepExecution);
|
||||
|
||||
+2
-1
@@ -128,7 +128,8 @@ public class LoanCOBPartitionerStepDefinitions implements En {
|
||||
businessSteps.stream().findFirst().get().getStepName());
|
||||
LoanCOBParameter loanCOBParameter = (LoanCOBParameter) resultItem.get(LoanCOBPartitioner.PARTITION_PREFIX + "1")
|
||||
.get(LoanCOBConstant.LOAN_COB_PARAMETER);
|
||||
assertEquals(null, loanCOBParameter);
|
||||
assertEquals(0L, loanCOBParameter.getMinLoanId());
|
||||
assertEquals(0L, loanCOBParameter.getMaxLoanId());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
+2
-2
@@ -71,9 +71,9 @@ public class LoanItemReaderStepDefinitions implements En {
|
||||
maxLoanId = splitAccounts.get(splitAccounts.size() - 1);
|
||||
}
|
||||
stepExecutionContext.put(LoanCOBConstant.LOAN_COB_PARAMETER, new LoanCOBParameter(minLoanId, maxLoanId));
|
||||
jobExecution.setExecutionContext(stepExecutionContext);
|
||||
stepExecution.setExecutionContext(stepExecutionContext);
|
||||
|
||||
lenient().when(this.loanRepository.findAllNonClosedLoansBehindOrNullByMinAndMaxLoanId(anyLong(), anyLong(), any()))
|
||||
lenient().when(this.loanRepository.findAllNonClosedLoansByLastClosedBusinessDateAndMinAndMaxLoanId(anyLong(), anyLong(), any()))
|
||||
.thenReturn(splitAccounts);
|
||||
|
||||
HashMap<BusinessDateType, LocalDate> businessDates = new HashMap<>();
|
||||
|
||||
Reference in New Issue
Block a user