Search in sources :

Example 1 with RedoLoanAccountPreviewPage

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);
}
Also used : RedoLoanDisbursalSchedulePreviewPage(org.mifos.test.acceptance.framework.loan.RedoLoanDisbursalSchedulePreviewPage) RedoLoanDisbursalParameters(org.mifos.test.acceptance.framework.loan.RedoLoanDisbursalParameters) RedoLoanDisbursalEntryPage(org.mifos.test.acceptance.framework.loan.RedoLoanDisbursalEntryPage) RedoLoanAccountPreviewPage(org.mifos.test.acceptance.framework.loan.RedoLoanAccountPreviewPage)

Aggregations

RedoLoanAccountPreviewPage (org.mifos.test.acceptance.framework.loan.RedoLoanAccountPreviewPage)1 RedoLoanDisbursalEntryPage (org.mifos.test.acceptance.framework.loan.RedoLoanDisbursalEntryPage)1 RedoLoanDisbursalParameters (org.mifos.test.acceptance.framework.loan.RedoLoanDisbursalParameters)1 RedoLoanDisbursalSchedulePreviewPage (org.mifos.test.acceptance.framework.loan.RedoLoanDisbursalSchedulePreviewPage)1