fixing error messages for min days between loan disbursal and repayment
This commit is contained in:
+16
-8
@@ -44,10 +44,10 @@ public class MinimumDaysBetweenDisbursalAndFirstRepaymentTest {
|
|||||||
private Integer groupCalendarId;
|
private Integer groupCalendarId;
|
||||||
private Integer loanProductId;
|
private Integer loanProductId;
|
||||||
private Integer loanId;
|
private Integer loanId;
|
||||||
private String loanPrincipalAmount = "100000.00";
|
private final String loanPrincipalAmount = "100000.00";
|
||||||
private String numberOfRepayments = "12";
|
private final String numberOfRepayments = "12";
|
||||||
private String interestRatePerPeriod = "18";
|
private final String interestRatePerPeriod = "18";
|
||||||
private String groupActivationDate = "1 August 2014";
|
private final String groupActivationDate = "1 August 2014";
|
||||||
|
|
||||||
@Before
|
@Before
|
||||||
public void setup() {
|
public void setup() {
|
||||||
@@ -134,8 +134,8 @@ public class MinimumDaysBetweenDisbursalAndFirstRepaymentTest {
|
|||||||
|
|
||||||
List<HashMap> error = (List<HashMap>) this.loanTransactionHelper.createLoanAccount(loanApplicationJSON,
|
List<HashMap> error = (List<HashMap>) this.loanTransactionHelper.createLoanAccount(loanApplicationJSON,
|
||||||
CommonConstants.RESPONSE_ERROR);
|
CommonConstants.RESPONSE_ERROR);
|
||||||
assertEquals("error.msg.loan.days.between.first.repayment.and.disbursal.are.less.than.minimum.allowed.numbers", error
|
assertEquals("error.msg.loan.days.between.first.repayment.and.disbursal.are.less.than.minimum.allowed",
|
||||||
.get(0).get(CommonConstants.RESPONSE_ERROR_MESSAGE_CODE));
|
error.get(0).get(CommonConstants.RESPONSE_ERROR_MESSAGE_CODE));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -174,8 +174,8 @@ public class MinimumDaysBetweenDisbursalAndFirstRepaymentTest {
|
|||||||
final String interval = "1"; // Every one week
|
final String interval = "1"; // Every one week
|
||||||
final String repeatsOnDay = "1"; // 1:Monday
|
final String repeatsOnDay = "1"; // 1:Monday
|
||||||
|
|
||||||
this.groupCalendarId = CalendarHelper.createMeetingCalendarForGroup(this.requestSpec, this.responseSpec, this.groupId, startDate,
|
this.setGroupCalendarId(CalendarHelper.createMeetingCalendarForGroup(this.requestSpec, this.responseSpec, this.groupId, startDate,
|
||||||
frequency, interval, repeatsOnDay);
|
frequency, interval, repeatsOnDay));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -196,4 +196,12 @@ public class MinimumDaysBetweenDisbursalAndFirstRepaymentTest {
|
|||||||
.withMinimumDaysBetweenDisbursalAndFirstRepayment(minimumDaysBetweenDisbursalAndFirstRepayment).build(null);
|
.withMinimumDaysBetweenDisbursalAndFirstRepayment(minimumDaysBetweenDisbursalAndFirstRepayment).build(null);
|
||||||
this.loanProductId = this.loanTransactionHelper.getLoanProductId(loanProductJSON);
|
this.loanProductId = this.loanTransactionHelper.getLoanProductId(loanProductJSON);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Integer getGroupCalendarId() {
|
||||||
|
return groupCalendarId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setGroupCalendarId(Integer groupCalendarId) {
|
||||||
|
this.groupCalendarId = groupCalendarId;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
+1
-1
@@ -18,7 +18,7 @@ public class MinDaysBetweenDisbursalAndFirstRepaymentViolationException extends
|
|||||||
|
|
||||||
public MinDaysBetweenDisbursalAndFirstRepaymentViolationException(final LocalDate disbursalDate, final LocalDate firstRepaymentDate,
|
public MinDaysBetweenDisbursalAndFirstRepaymentViolationException(final LocalDate disbursalDate, final LocalDate firstRepaymentDate,
|
||||||
Integer minimumDaysBetweenDisbursalAndFirstRepayment) {
|
Integer minimumDaysBetweenDisbursalAndFirstRepayment) {
|
||||||
super("error.msg.loan.days.between.first.repayment.and.disbursal.are.less.than.minimum.allowed.numbers",
|
super("error.msg.loan.days.between.first.repayment.and.disbursal.are.less.than.minimum.allowed",
|
||||||
"Number of days between loan disbursal (" + disbursalDate + ") and first repayment (" + firstRepaymentDate
|
"Number of days between loan disbursal (" + disbursalDate + ") and first repayment (" + firstRepaymentDate
|
||||||
+ ") can't be less than (" + minimumDaysBetweenDisbursalAndFirstRepayment + ").", disbursalDate,
|
+ ") can't be less than (" + minimumDaysBetweenDisbursalAndFirstRepayment + ").", disbursalDate,
|
||||||
firstRepaymentDate, minimumDaysBetweenDisbursalAndFirstRepayment);
|
firstRepaymentDate, minimumDaysBetweenDisbursalAndFirstRepayment);
|
||||||
|
|||||||
Reference in New Issue
Block a user