use of org.mifos.test.acceptance.framework.loan.DisburseLoanParameters in project head by mifos.
the class RemovePenaltiesTest method shouldRemovePenaltyBeforeDisbursal.
@Test(enabled = true)
public void shouldRemovePenaltyBeforeDisbursal() throws Exception {
final String accountId = setUpPenaltyAndLoanAccount(false, PenaltyFormParameters.FREQUENCY_NONE);
LoanAccountPage loanAccountPage = navigationHelper.navigateToLoanAccountPage(accountId);
loanAccountPage.removeOneTimePenalty(1);
loanAccountPage.verifyNoOneTimePenaltyRemovalLinkExists(1);
final DisburseLoanParameters disburseParams = new DisburseLoanParameters();
disburseParams.setAmount(loanAccountPage.getOriginalTotalAmount());
disburseParams.setDisbursalDateDD("15");
disburseParams.setDisbursalDateMM("2");
disburseParams.setDisbursalDateYYYY("2012");
disburseParams.setPaymentType(DisburseLoanParameters.CASH);
loanAccountPage.changeAccountStatusToAccepted().disburseLoan(disburseParams);
changeDateTime(04, 1);
verifyCalculatePenaltyWithoutPenalty(accountId);
}
use of org.mifos.test.acceptance.framework.loan.DisburseLoanParameters in project head by mifos.
the class LoanTestHelper method setDisbursalParams.
public DisburseLoanParameters setDisbursalParams(ReadableInstant validDisbursalDate) {
DisburseLoanParameters disburseLoanParameters = new DisburseLoanParameters();
String dd = DateTimeFormat.forPattern("dd").print(validDisbursalDate);
String mm = DateTimeFormat.forPattern("MM").print(validDisbursalDate);
String yyyy = DateTimeFormat.forPattern("yyyy").print(validDisbursalDate);
disburseLoanParameters.setDisbursalDateDD(dd);
disburseLoanParameters.setDisbursalDateMM(mm);
disburseLoanParameters.setDisbursalDateYYYY(yyyy);
disburseLoanParameters.setPaymentType(DisburseLoanParameters.CASH);
return disburseLoanParameters;
}
use of org.mifos.test.acceptance.framework.loan.DisburseLoanParameters in project head by mifos.
the class PenaltyHelper method createWeeklyLoanAccountWithPenalty.
public LoanAccountPage createWeeklyLoanAccountWithPenalty(final SubmitFormParameters formParameters, final String clientName, final boolean disbursal) throws Exception {
navigationHelper.navigateToAdminPage().verifyPage().defineLoanProduct(formParameters);
final CreateLoanAccountSearchParameters searchParam = new CreateLoanAccountSearchParameters();
searchParam.setSearchString(clientName);
searchParam.setLoanProduct(formParameters.getOfferingName());
LoanAccountPage loanAccountPage = navigationHelper.navigateToClientsAndAccountsPage().navigateToCreateLoanAccountUsingLeftMenu().searchAndNavigateToCreateLoanAccountPage(searchParam).navigateToReviewInstallmentsPage().clickPreviewAndGoToReviewLoanAccountPage().submitForApprovalAndNavigateToConfirmationPage().navigateToLoanAccountDetailsPage();
if (disbursal) {
loanAccountPage.changeAccountStatusToAccepted();
final DisburseLoanParameters disburseParams = new DisburseLoanParameters();
disburseParams.setAmount(formParameters.getDefaultLoanAmount());
disburseParams.setDisbursalDateDD("15");
disburseParams.setDisbursalDateMM("2");
disburseParams.setDisbursalDateYYYY("2012");
disburseParams.setPaymentType(DisburseLoanParameters.CASH);
loanAccountPage.disburseLoan(disburseParams);
}
return loanAccountPage;
}
use of org.mifos.test.acceptance.framework.loan.DisburseLoanParameters in project head by mifos.
the class LoanTestHelper method disburseLoan.
public void disburseLoan(DateTime disbursalDate) throws UnsupportedEncodingException {
setApplicationTime(disbursalDate).navigateBack();
DisburseLoanParameters disburseLoanParameters = setDisbursalParams(disbursalDate);
LoanAccountPage loanAccountPage = new LoanAccountPage(selenium).navigateToDisburseLoan().submitAndNavigateToDisburseLoanConfirmationPage(disburseLoanParameters).submitAndNavigateToLoanAccountPage();
loanAccountPage.verifyStatus(LoanAccountPage.ACTIVE);
}
use of org.mifos.test.acceptance.framework.loan.DisburseLoanParameters in project head by mifos.
the class CreateLSIMClientLoanAccountTest method createDisubreseLoanParameters.
private DisburseLoanParameters createDisubreseLoanParameters(String d, String m, String y) {
DisburseLoanParameters disburseLoanParameters = new DisburseLoanParameters();
disburseLoanParameters.setDisbursalDateDD(d);
disburseLoanParameters.setDisbursalDateMM(m);
disburseLoanParameters.setDisbursalDateYYYY(y);
disburseLoanParameters.setPaymentType(PaymentParameters.CASH);
return disburseLoanParameters;
}
Aggregations