adamsaghy commented on code in PR #2745: URL: https://github.com/apache/fineract/pull/2745#discussion_r1023792846
########## fineract-provider/src/test/java/org/apache/fineract/cob/loan/CheckLoanRepaymentOverdueBusinessStepTest.java: ########## @@ -95,11 +94,12 @@ public void givenLoanWithNoInstallmentOverdueAfterConfiguredDaysWhenStepExecutio // given when(configurationDomainService.retrieveRepaymentOverdueDays()).thenReturn(1L); LocalDate loanInstallmentRepaymentDueDateBefore5Days = DateUtils.getBusinessLocalDate().minusDays(5); - Collection<OverdueLoanScheduleData> overdueInstallmentsForLoan = Arrays - .asList(new OverdueLoanScheduleData(1L, 1L, loanInstallmentRepaymentDueDateBefore5Days.toString(), BigDecimal.valueOf(0.0), - "", "", BigDecimal.valueOf(0.0), BigDecimal.valueOf(0.0), 1)); - when(loanReadPlatformService.retrieveAllOverdueInstallmentsForLoan(any())).thenReturn(overdueInstallmentsForLoan); Loan loanForProcessing = Mockito.mock(Loan.class); + List<LoanRepaymentScheduleInstallment> loanRepaymentScheduleInstallments = Arrays + .asList(new LoanRepaymentScheduleInstallment(loanForProcessing, 1, LocalDate.now(ZoneId.systemDefault()), + loanInstallmentRepaymentDueDateBefore5Days, BigDecimal.valueOf(0.0), BigDecimal.valueOf(0.0), + BigDecimal.valueOf(0.0), BigDecimal.valueOf(0.0), false, new HashSet<>(), BigDecimal.valueOf(0.0))); Review Comment: Would you please extend your test suite with the following: numberOfDaysAfterDueDateToRaiseEvent = 1 There are 2 installments - First is fully paid - Second is not fully paid Run the job on the first installment due date. Outcome should be nothing. (no event raised) Run the job on the first installment due date + 1. Outcome should be nothing. (no event raised) Run the job on the first installment due date + 2. Outcome should be nothing (no event raised) Run the job on the second installment due date. Outcome should be nothing. (no event raised) Run the job on the second installment due date + 1. Outcome: event raised! Run the job on the second installment due date + 2. Outcome should be nothing (no event raised) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@fineract.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org