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);
}
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();
}
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);
}
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);
}
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;
}
Aggregations