FINERACT-1724: Extra logging and measurements for Loan COB business steps + minor fixes here and there

This commit is contained in:
Arnold Galovics
2023-03-09 16:16:05 +01:00
committed by Arnold Gálovics
parent 36f907906d
commit 83de7652e6
11 changed files with 290 additions and 20 deletions
@@ -374,18 +374,9 @@ public class ClientLoanCreditBalanceRefundandRepaymentTypeIntegrationTest {
Integer resourceId = (Integer) this.loanTransactionHelper.makeRepaymentTypePayment(REPAYMENT, "06 January 2022", 13000.00f,
this.disbursedLoanID, "resourceId");
Assertions.assertNotNull(resourceId);
if (repaymentTransactionType.equalsIgnoreCase(REPAYMENT)) {
ArrayList<HashMap> errors = (ArrayList<HashMap>) this.loanTransactionHelperValidationError.makeRepaymentTypePayment(
repaymentTransactionType, "06 January 2022", 1.00f, this.disbursedLoanID, CommonConstants.RESPONSE_ERROR);
assertEquals("error.msg.loan.repayment.or.waiver.account.is.not.active",
errors.get(0).get(CommonConstants.RESPONSE_ERROR_MESSAGE_CODE));
} else {
resourceId = (Integer) this.loanTransactionHelper.makeRepaymentTypePayment(repaymentTransactionType, "06 January 2022", 1.00f,
this.disbursedLoanID, "resourceId");
Assertions.assertNotNull(resourceId);
}
resourceId = (Integer) this.loanTransactionHelper.makeRepaymentTypePayment(repaymentTransactionType, "06 January 2022", 1.00f,
this.disbursedLoanID, "resourceId");
Assertions.assertNotNull(resourceId);
}
@Test
@@ -207,12 +207,12 @@ public class InlineLoanCOBTest {
Assertions.assertTrue(loanDelinquencyTags.isEmpty());
Assertions.assertEquals(LocalDate.of(2020, 3, 2), loan.getLastClosedBusinessDate());
BusinessDateHelper.updateBusinessDate(requestSpec, responseSpec, BusinessDateType.COB_DATE, LocalDate.of(2020, 4, 5));
BusinessDateHelper.updateBusinessDate(requestSpec, responseSpec, BusinessDateType.COB_DATE, LocalDate.of(2020, 4, 4));
inlineLoanCOBHelper.executeInlineCOB(List.of(loanID.longValue()));
loan = loanTransactionHelper.getLoan(requestSpec, responseSpec, loanID);
loanDelinquencyTags = loanTransactionHelper.getLoanDelinquencyTags(requestSpec, responseSpec, loanID);
Assertions.assertEquals(LocalDate.of(2020, 4, 5), loan.getLastClosedBusinessDate());
Assertions.assertEquals(LocalDate.of(2020, 4, 4), loan.getLastClosedBusinessDate());
Assertions.assertEquals(1, loanDelinquencyTags.size());
Assertions.assertEquals(LocalDate.of(2020, 4, 3), loanDelinquencyTags.get(0).getAddedOnDate());