Search in sources :

Example 6 with RedoLoanDisbursalParameters

use of org.mifos.test.acceptance.framework.loan.RedoLoanDisbursalParameters in project head by mifos.

the class LoanAccountAdjustmentsTest method verifyChangesInTransactionHistory.

/**
     * Verify multiple adjustment changes are logged in transaction history with proper GL codes,
     * account summary changes when the account status is "Active in Bad Standing".
     * http://mifosforge.jira.com/browse/MIFOSTEST-27
     *
     * @throws Exception
     */
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
public void verifyChangesInTransactionHistory() throws Exception {
    RedoLoanDisbursalParameters redoParams = new RedoLoanDisbursalParameters();
    redoParams.setDisbursalDateDD("04");
    redoParams.setDisbursalDateMM("03");
    redoParams.setDisbursalDateYYYY("2011");
    LoanAccountPage loanAccountPage = loanTestHelper.redoLoanDisbursal("Default Group", "WeeklyGroupFlatLoanWithOnetimeFee", redoParams, null, 0, false);
    String loanID = loanAccountPage.getAccountId();
    loanAccountPage = loanTestHelper.applyMultipleAdjustments(loanID, 2);
    loanAccountPage.verifyStatus(LoanAccountPage.ACTIVE_BAD);
    loanAccountPage.verifyTotalOriginalLoan("1029.0");
    loanAccountPage.verifyTotalAmountPaid("0.0");
    loanAccountPage.verifyAccountSummary("775.0", "25/03/2011", "520.0");
    TransactionHistoryPage transactionHistoryPage = loanAccountPage.navigateToTransactionHistory();
    transactionHistoryPage.verifyTransactionHistory(510.8, 2, 22);
}
Also used : TransactionHistoryPage(org.mifos.test.acceptance.framework.loan.TransactionHistoryPage) RedoLoanDisbursalParameters(org.mifos.test.acceptance.framework.loan.RedoLoanDisbursalParameters) LoanAccountPage(org.mifos.test.acceptance.framework.loan.LoanAccountPage)

Example 7 with RedoLoanDisbursalParameters

use of org.mifos.test.acceptance.framework.loan.RedoLoanDisbursalParameters in project head by mifos.

the class SavingsPaymentTest method setUpLoanAccount.

private String setUpLoanAccount() {
    RedoLoanDisbursalParameters redoParams = new RedoLoanDisbursalParameters();
    redoParams.setDisbursalDateDD("12");
    redoParams.setDisbursalDateMM("03");
    redoParams.setDisbursalDateYYYY("2011");
    LoanAccountPage loanAccountPage = loanTestHelper.redoLoanDisbursal(CLIENT_GLOBAL_NUM, "ClientEmergencyLoan", redoParams, null, 0, false);
    return loanAccountPage.getAccountId();
}
Also used : RedoLoanDisbursalParameters(org.mifos.test.acceptance.framework.loan.RedoLoanDisbursalParameters) LoanAccountPage(org.mifos.test.acceptance.framework.loan.LoanAccountPage)

Example 8 with RedoLoanDisbursalParameters

use of org.mifos.test.acceptance.framework.loan.RedoLoanDisbursalParameters in project head by mifos.

the class RedoLoanDisbursalTest method redoLoanDisbursalWithPastDate.

/*
     * Verify a redone loan directly moves into "Closed-Met Obligation"
     * state when the loan is wholly paid off before the current date.
     *
     * http://mifosforge.jira.com/browse/MIFOSTEST-28
     */
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
public void redoLoanDisbursalWithPastDate() throws Exception {
    RedoLoanDisbursalParameters paramsPastDate = new RedoLoanDisbursalParameters();
    paramsPastDate.setDisbursalDateDD("25");
    paramsPastDate.setDisbursalDateMM("02");
    paramsPastDate.setDisbursalDateYYYY("2011");
    LoanAccountPage loanAccountPage = loanTestHelper.redoLoanDisbursal("Default Group", "WeeklyGroupFlatLoanWithOnetimeFee", paramsPastDate, null, 0, false);
    verifyRedoLoanDisbursalWithPastDate(loanAccountPage);
}
Also used : RedoLoanDisbursalParameters(org.mifos.test.acceptance.framework.loan.RedoLoanDisbursalParameters) LoanAccountPage(org.mifos.test.acceptance.framework.loan.LoanAccountPage)

Example 9 with RedoLoanDisbursalParameters

use of org.mifos.test.acceptance.framework.loan.RedoLoanDisbursalParameters 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)

Example 10 with RedoLoanDisbursalParameters

use of org.mifos.test.acceptance.framework.loan.RedoLoanDisbursalParameters in project head by mifos.

the class RedoLoanDisbursalTest method setLoanParams.

private RedoLoanDisbursalParameters setLoanParams(ReadableInstant validDisbursalDate, int interest, int noOfInstallments, int loanAmount) {
    RedoLoanDisbursalParameters redoLoanDisbursalParameters = new RedoLoanDisbursalParameters();
    redoLoanDisbursalParameters.setInterestRate(String.valueOf(interest));
    redoLoanDisbursalParameters.setNumberOfInstallments(String.valueOf(noOfInstallments));
    redoLoanDisbursalParameters.setLoanAmount(String.valueOf(loanAmount));
    redoLoanDisbursalParameters.setDisbursalDateDD(DateTimeFormat.forPattern("dd").print(validDisbursalDate));
    redoLoanDisbursalParameters.setDisbursalDateMM(DateTimeFormat.forPattern("MM").print(validDisbursalDate));
    redoLoanDisbursalParameters.setDisbursalDateYYYY(DateTimeFormat.forPattern("yyyy").print(validDisbursalDate));
    return redoLoanDisbursalParameters;
}
Also used : RedoLoanDisbursalParameters(org.mifos.test.acceptance.framework.loan.RedoLoanDisbursalParameters)

Aggregations

RedoLoanDisbursalParameters (org.mifos.test.acceptance.framework.loan.RedoLoanDisbursalParameters)12 LoanAccountPage (org.mifos.test.acceptance.framework.loan.LoanAccountPage)8 RedoLoanDisbursalEntryPage (org.mifos.test.acceptance.framework.loan.RedoLoanDisbursalEntryPage)4 RedoLoanDisbursalSchedulePreviewPage (org.mifos.test.acceptance.framework.loan.RedoLoanDisbursalSchedulePreviewPage)3 DateTime (org.joda.time.DateTime)2 AdminPage (org.mifos.test.acceptance.framework.admin.AdminPage)1 ApplyAdjustmentPage (org.mifos.test.acceptance.framework.loan.ApplyAdjustmentPage)1 CreateLoanAccountSearchParameters (org.mifos.test.acceptance.framework.loan.CreateLoanAccountSearchParameters)1 DisburseLoanParameters (org.mifos.test.acceptance.framework.loan.DisburseLoanParameters)1 RedoLoanAccountPreviewPage (org.mifos.test.acceptance.framework.loan.RedoLoanAccountPreviewPage)1 RedoLoanDisbursalChooseLoanInstancePage (org.mifos.test.acceptance.framework.loan.RedoLoanDisbursalChooseLoanInstancePage)1 RedoLoanDisbursalSearchPage (org.mifos.test.acceptance.framework.loan.RedoLoanDisbursalSearchPage)1 RedoLoanDisbursalSearchResultsPage (org.mifos.test.acceptance.framework.loan.RedoLoanDisbursalSearchResultsPage)1 TransactionHistoryPage (org.mifos.test.acceptance.framework.loan.TransactionHistoryPage)1 ViewRepaymentSchedulePage (org.mifos.test.acceptance.framework.loan.ViewRepaymentSchedulePage)1 DefineNewLoanProductPage (org.mifos.test.acceptance.framework.loanproduct.DefineNewLoanProductPage)1 SubmitFormParameters (org.mifos.test.acceptance.framework.loanproduct.DefineNewLoanProductPage.SubmitFormParameters)1 Test (org.testng.annotations.Test)1