FINERACT-2354: First step - basic implementation of re-aging for Interest bearing loans - Default Behavior, interestRecalculation = true, without dueDate change
This commit is contained in:
committed by
Adam Saghy
parent
23c1b2b8af
commit
d21a1a98a2
-28
@@ -288,20 +288,6 @@ class LoanReAgingValidatorTest {
|
||||
.isEqualTo("validation.msg.loan.reAge.numberOfInstallments.not.greater.than.zero");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testValidateReAge_ShouldThrowException_WhenLoanIsBeforeMaturity() {
|
||||
// given
|
||||
ThreadLocalContextUtil.setBusinessDates(new HashMap<>(Map.of(BusinessDateType.BUSINESS_DATE, actualDate)));
|
||||
Loan loan = loan();
|
||||
JsonCommand command = jsonCommand();
|
||||
// when
|
||||
GeneralPlatformDomainRuleException result = assertThrows(GeneralPlatformDomainRuleException.class,
|
||||
() -> underTest.validateReAge(loan, command));
|
||||
// then
|
||||
assertThat(result).isNotNull();
|
||||
assertThat(result.getGlobalisationMessageCode()).isEqualTo("error.msg.loan.reage.cannot.be.submitted.before.maturity");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testValidateReAge_ShouldThrowException_WhenStartDateIsBeforeMaturity() {
|
||||
// given
|
||||
@@ -350,20 +336,6 @@ class LoanReAgingValidatorTest {
|
||||
.isEqualTo("error.msg.loan.reage.supported.only.for.progressive.loan.schedule.type");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testValidateReAge_ShouldThrowException_WhenLoanIsInterestBearing() {
|
||||
// given
|
||||
Loan loan = loan();
|
||||
given(loan.isInterestBearing()).willReturn(true);
|
||||
JsonCommand command = jsonCommand();
|
||||
// when
|
||||
GeneralPlatformDomainRuleException result = assertThrows(GeneralPlatformDomainRuleException.class,
|
||||
() -> underTest.validateReAge(loan, command));
|
||||
// then
|
||||
assertThat(result).isNotNull();
|
||||
assertThat(result.getGlobalisationMessageCode()).isEqualTo("error.msg.loan.reage.supported.only.for.non.interest.loans");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testValidateReAge_ShouldThrowException_WhenLoanIsNotActive() {
|
||||
// given
|
||||
|
||||
Reference in New Issue
Block a user