use of org.mifos.test.acceptance.framework.loan.RedoLoanAccountPreviewPage in project head by mifos.
the class RedoLoanDisbursalTest method redoLoanDisbursalForDecliningBalanceLoan.
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
public void redoLoanDisbursalForDecliningBalanceLoan() throws Exception {
dataSetUpForVariableInstallmentLoan();
applicationDatabaseOperation.updateLSIM(1);
String[] fees = getInvalidFees();
loanTestHelper.setApplicationTime(systemDateTime.plusDays(14));
RedoLoanDisbursalEntryPage redoLoanDisbursalEntryPage = navigateToRedoLoanPage().selectFee(new String[] { fees[0] });
int interest = 24;
int noOfInstallments = 5;
int loanAmount = 1000;
RedoLoanDisbursalParameters redoLoanDisbursalParameters = setLoanParams(systemDateTime, interest, noOfInstallments, loanAmount);
RedoLoanDisbursalSchedulePreviewPage redoLoanDisbursalSchedulePreviewPage = redoLoanDisbursalEntryPage.submitAndNavigateToRedoLoanDisbursalSchedulePreviewPage(redoLoanDisbursalParameters);
RedoLoanAccountPreviewPage redoLoanAccountPreviewPage = redoLoanDisbursalSchedulePreviewPage.setPaidField(RedoLoanScheduleData.DECLINING_PRINCIPAL_LATE_PAYMENT_1).clickPreviewAndGoToReviewLoanAccountPage();
String[][] expectedRepaymentSchedule = new String[][] { { "1", "15-Oct-2010", "19-Oct-2010", "200.4", "4.6", "100", "305" }, { "2", "22-Oct-2010", "19-Oct-2010", "0.4", "4.6", "100", "105" } };
String[][] expectedFutureInstallments = new String[][] { { "2", "22-Oct-2010", "-", "200", "0", "0", "200" }, { "3", "29-Oct-2010", "-", "200.4", "4.6", "100", "305" }, { "4", "05-Nov-2010", "-", "200.4", "4.6", "100", "305" }, { "5", "12-Nov-2010", "-", "198.4", "5.6", "100", "304" } };
String[][] expectedRepaymentBalance = new String[][] { { "799.6", "19.4", "400", "1,219" }, { "799.2", "14.8", "300", "1,114" } };
redoLoanAccountPreviewPage.verifyRunningBalance(expectedRepaymentSchedule, expectedFutureInstallments, expectedRepaymentBalance);
}
Aggregations