use of org.mifos.test.acceptance.framework.loan.CreateLoanAccountSearchParameters in project head by mifos.
the class ProperLoanProductCalculationsTest method verifyProperInterestAndPaymentMonthlyDecliningFixedProduct.
/**
* Declining fixed principal fixed payment type monthly loan calculates and
* displays proper interest and payment information.
* http://mifosforge.jira.com/browse/MIFOSTEST-67
* @throws Exception
*/
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
public void verifyProperInterestAndPaymentMonthlyDecliningFixedProduct() throws Exception {
DefineNewLoanProductPage.SubmitFormParameters productParams = FormParametersHelper.getMonthlyLoanProductParameters();
String productName = "LoanProduct" + StringUtil.getRandomString(5);
productParams.setOfferingName(productName);
productParams.setOfferingShortName(StringUtil.getRandomString(4));
productParams.setDefaultInterestRate("19.9");
productParams.setMaxInterestRate("50");
productParams.setInterestTypes(SubmitFormParameters.DECLINING_BALANCE_EPI);
productParams.setDefaultLoanAmount("57199");
productParams.setDefInstallments("32");
CreateLoanAccountSearchParameters searchParams = new CreateLoanAccountSearchParameters();
searchParams.setSearchString("Client - Mary Monthly");
searchParams.setLoanProduct(productName);
loanProductTestHelper.defineNewLoanProduct(productParams);
LoanAccountPage loanAccountPage = loanTestHelper.createAndActivateDefaultLoanAccount(searchParams);
loanAccountPage.verifyPrincipalOriginal("57,199");
loanAccountPage.verifyInterestOriginal("15,652");
loanAccountPage.verifyFeesOriginal("0");
loanAccountPage.verifyPenaltyOriginal("0");
loanAccountPage.verifyTotalOriginalLoan("72851.0");
}
use of org.mifos.test.acceptance.framework.loan.CreateLoanAccountSearchParameters in project head by mifos.
the class ProperLoanProductCalculationsTest method verifyProperInterestAndPaymentWeeklyFlatProduct.
/**
* Flat interest rate weekly loan calculates and displays proper interest and payment information.
* http://mifosforge.jira.com/browse/MIFOSTEST-63
* @throws Exception
*/
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
public void verifyProperInterestAndPaymentWeeklyFlatProduct() throws Exception {
DefineNewLoanProductPage.SubmitFormParameters productParams = FormParametersHelper.getWeeklyLoanProductParameters();
String productName = "LoanProduct" + StringUtil.getRandomString(5);
productParams.setOfferingName(productName);
productParams.setOfferingShortName(StringUtil.getRandomString(4));
productParams.setDefaultInterestRate("36");
productParams.setMaxInterestRate("50");
productParams.setInterestTypes(SubmitFormParameters.FLAT);
productParams.setDefaultLoanAmount("2500");
productParams.setDefInstallments("11");
loanProductTestHelper.defineNewLoanProduct(productParams);
CreateLoanAccountSearchParameters searchParams = new CreateLoanAccountSearchParameters();
searchParams.setSearchString("Stu1233266063395 Client1233266063395");
searchParams.setLoanProduct(productName);
LoanAccountPage loanAccountPage = loanTestHelper.createAndActivateDefaultLoanAccount(searchParams);
loanAccountPage.verifyPrincipalOriginal("2,500");
loanAccountPage.verifyInterestOriginal("190");
loanAccountPage.verifyFeesOriginal("0");
loanAccountPage.verifyPenaltyOriginal("0");
loanAccountPage.verifyTotalOriginalLoan("2690.0");
}
use of org.mifos.test.acceptance.framework.loan.CreateLoanAccountSearchParameters in project head by mifos.
the class ApplyChargeGroupLoanTest method applyMiscPenalty.
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
public void applyMiscPenalty() throws Exception {
DateTimeUpdaterRemoteTestingService dateTimeUpdaterRemoteTestingService = new DateTimeUpdaterRemoteTestingService(selenium);
DateTime targetTime = new DateTime(2013, 02, 8, 13, 0, 0, 0);
dateTimeUpdaterRemoteTestingService.setDateTime(targetTime);
CreateLoanAccountSearchParameters searchParameters = new CreateLoanAccountSearchParameters();
searchParameters.setSearchString("Default Group");
searchParameters.setLoanProduct("WeeklyGroupFlatLoanWithOnetimeFee");
List<GLIMClient> glimClients = new ArrayList<GLIMClient>();
glimClients.add(new GLIMClient(0, "Stu1233266299995 Client1233266299995 Client Id: 0002-000000012", "1500", null));
glimClients.add(new GLIMClient(2, "Stu1233266319760 Client1233266319760 Client Id: 0002-000000014", "1500", null));
LoanAccountPage loanAccountPage = loanTestHelper.createGroupLoanAccount(searchParameters, glimClients);
String loanId = loanAccountPage.getAccountId();
String penaltyAmount = "100";
List<String> individualPenaltyAmounts = new ArrayList<String>();
individualPenaltyAmounts.add("20");
individualPenaltyAmounts.add("80");
ChargeParameters params = new ChargeParameters();
params.setType(ChargeParameters.MISC_PENALTY);
params.setAmount(penaltyAmount);
params.setGroupLoanIndividualAmounts(individualPenaltyAmounts);
loanAccountPage = loanTestHelper.applyChargeToGroupLoan(loanId, params);
verifyPenaltySummaryAndActivity(loanAccountPage, penaltyAmount, "Misc penalty applied", 2);
verifyRepaymentSchedulePage(loanAccountPage, penaltyAmount);
for (int i = 0; i < glimClients.size(); i++) {
LoanAccountPage individualLoanAccountPage = loanAccountPage.navigateToIndividualLoanAccountPageFromPendingApprovalGroupLoan(i);
verifyPenaltySummaryAndActivity(individualLoanAccountPage, individualPenaltyAmounts.get(i), "Misc penalty applied", 2);
verifyRepaymentSchedulePage(individualLoanAccountPage, individualPenaltyAmounts.get(i));
individualLoanAccountPage.navigateToGroupLoanPageFromIndividualLoanPage();
}
}
use of org.mifos.test.acceptance.framework.loan.CreateLoanAccountSearchParameters in project head by mifos.
the class VariableInstalmentRecalculationTest method setLoanSearchParameters.
private CreateLoanAccountSearchParameters setLoanSearchParameters() {
CreateLoanAccountSearchParameters accountSearchParameters = new CreateLoanAccountSearchParameters();
accountSearchParameters.setSearchString(clientName);
accountSearchParameters.setLoanProduct(loanProductName);
return accountSearchParameters;
}
use of org.mifos.test.acceptance.framework.loan.CreateLoanAccountSearchParameters in project head by mifos.
the class ViewOriginalLoanScheduleTest method setLoanSearchParameters.
private CreateLoanAccountSearchParameters setLoanSearchParameters() {
CreateLoanAccountSearchParameters accountSearchParameters = new CreateLoanAccountSearchParameters();
accountSearchParameters.setLoanProduct(loanProductName);
accountSearchParameters.setSearchString(clientName);
return accountSearchParameters;
}
Aggregations