use of org.mifos.test.acceptance.framework.loan.RedoLoanDisbursalParameters in project head by mifos.
the class RedoLoanDisbursalTest method redoLoanOnPastDateWithLSIMAndGLIM.
/**
* Verify whether a loan can be redone on a past date with GLIM and LSIM turned on.
* http://mifosforge.jira.com/browse/MIFOSTEST-18
*/
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
public void redoLoanOnPastDateWithLSIMAndGLIM() throws Exception {
applicationDatabaseOperation.updateGLIM(1);
applicationDatabaseOperation.updateLSIM(1);
RedoLoanDisbursalParameters paramsPastDate = new RedoLoanDisbursalParameters();
paramsPastDate.setDisbursalDateDD("21");
paramsPastDate.setDisbursalDateMM("02");
paramsPastDate.setDisbursalDateYYYY("2012");
paramsPastDate.addClient(1, "3000.0", "0009-Horse");
paramsPastDate.addClient(2, "3000.0", "0001-Cow Purchase");
LoanAccountPage loanAccountPage = loanTestHelper.redoLoanDisbursalWithGLIMandLSIM("Default Group", "GroupEmergencyLoan", paramsPastDate);
loanAccountPage.verifyStatus(LoanAccountPage.ACTIVE);
loanAccountPage.verifyPrincipalOriginal("6,000");
}
use of org.mifos.test.acceptance.framework.loan.RedoLoanDisbursalParameters in project head by mifos.
the class RedoLoanDisbursalTest method redoLoanDisbursalWithPastDateUnpaid.
/*
* Verify that the status of the loan is Active in Good Standing
* when the loan is not wholly paid off before current date.
* Also verifies that loan cannot be redone on a date equal to
* or greater than the current date.
*
* http://mifosforge.jira.com/browse/MIFOSTEST-15
*/
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
public void redoLoanDisbursalWithPastDateUnpaid() throws Exception {
// Testing redo loan
RedoLoanDisbursalParameters paramsPastDate = new RedoLoanDisbursalParameters();
paramsPastDate.setDisbursalDateDD("25");
paramsPastDate.setDisbursalDateMM("02");
paramsPastDate.setDisbursalDateYYYY("2011");
paramsPastDate.setLoanAmount("3000.0");
paramsPastDate.setInterestRate("10");
paramsPastDate.setNumberOfInstallments("52");
RedoLoanDisbursalParameters paramsCurrentDate = new RedoLoanDisbursalParameters();
paramsCurrentDate.setDisbursalDateDD("22");
paramsCurrentDate.setDisbursalDateMM("2");
paramsCurrentDate.setDisbursalDateYYYY("2012");
LoanAccountPage loanAccountPage = loanTestHelper.redoLoanDisbursal("Default Group", "WeeklyGroupFlatLoanWithOnetimeFee", paramsPastDate, paramsCurrentDate, 0, true);
loanAccountPage.verifyStatus("Active in Good Standing");
loanAccountPage.verifyPerformanceHistory("51", "0");
// Testing multiple reverse payments
String payAmount = "63";
String reverseNote = "Reversed ";
int loanBalance = (int) (Float.parseFloat(loanAccountPage.getTotalBalance()) + 63 * 3);
for (int i = 0; i < 3; i++) {
ApplyAdjustmentPage applyAdjustmentPage = loanAccountPage.navigateToApplyAdjustment();
applyAdjustmentPage.verifyAdjustment(payAmount, reverseNote + (i + 1));
}
verifyMultipleReversePayments(loanAccountPage, payAmount, reverseNote, loanBalance);
}
Aggregations