use of org.mifos.test.acceptance.framework.loan.CreateLoanAccountSearchParameters in project head by mifos.
the class CreateLSIMClientLoanAccountTest method createWeeklyLoanAccountWithNonMeetingDatesForDisburseAndRepay.
// http://mifosforge.jira.com/browse/MIFOSTEST-121
@Test(enabled = true)
public void createWeeklyLoanAccountWithNonMeetingDatesForDisburseAndRepay() throws Exception {
//Given
setTime(2011, 02, 23);
//When
DefineNewLoanProductPage.SubmitFormParameters defineNewLoanProductformParameters = FormParametersHelper.getWeeklyLoanProductParameters();
CreateLoanAccountSearchParameters searchParameters = new CreateLoanAccountSearchParameters();
searchParameters.setSearchString("Stu1233171716380 Client1233171716380");
searchParameters.setLoanProduct(defineNewLoanProductformParameters.getOfferingName());
CreateLoanAccountSubmitParameters submitAccountParameters = new CreateLoanAccountSubmitParameters();
submitAccountParameters = createSearchParameters("23", "02", "2011");
submitAccountParameters.setLoanPurpose("0008-Animal Trading");
EditLoanAccountStatusParameters editLoanAccountStatusParameters = new EditLoanAccountStatusParameters();
editLoanAccountStatusParameters.setStatus(AccountStatus.LOAN_APPROVED.getStatusText());
editLoanAccountStatusParameters.setNote("activate account");
DisburseLoanParameters disburseLoanParameters = new DisburseLoanParameters();
disburseLoanParameters = createDisubreseLoanParameters("24", "02", "2011");
loanProductTestHelper.defineNewLoanProduct(defineNewLoanProductformParameters);
String loanId = loanTestHelper.createLoanAccount(searchParameters, submitAccountParameters).getAccountId();
loanTestHelper.changeLoanAccountStatus(loanId, editLoanAccountStatusParameters);
//Then
loanTestHelper.disburseLoanWithWrongParams(loanId, disburseLoanParameters, "Date of transaction can not be a future date.");
disburseLoanParameters.setDisbursalDateDD("23");
loanTestHelper.disburseLoan(loanId, disburseLoanParameters);
//loanTestHelper.disburseLoan(loanId, disburseLoanParameters);
loanTestHelper.repayLoan(loanId);
}
use of org.mifos.test.acceptance.framework.loan.CreateLoanAccountSearchParameters in project head by mifos.
the class CreateLSIMClientLoanAccountTest method newMonthlyClientLoanAccountWithMeetingOnSpecificDayOfMonth.
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
// one of the dependent methods throws Exception
@Test(enabled = true)
public void newMonthlyClientLoanAccountWithMeetingOnSpecificDayOfMonth() throws Exception {
CreateLoanAccountSearchParameters searchParameters = new CreateLoanAccountSearchParameters();
searchParameters.setSearchString("Client - Mary Monthly1");
searchParameters.setLoanProduct("MonthlyClientFlatLoan1stOfMonth");
expectedDate = "05-Feb-2010";
CreateLoanAccountSubmitParameters submitAccountParameters = new CreateLoanAccountSubmitParameters();
submitAccountParameters.setAmount("1234.0");
submitAccountParameters.setLoanPurpose("0008-Animal Trading");
// create LSIM loan that has repayments on 5th of every month
submitAccountParameters.setLsimFrequencyMonths("on");
submitAccountParameters.setLsimMonthTypeDayOfMonth("on");
submitAccountParameters.setLsimDayOfMonth("5");
submitAccountParameters.setLoanPurpose("0010-Camel");
createLSIMLoanAndCheckAmountAndInstallmentDate(searchParameters, submitAccountParameters, expectedDate);
}
use of org.mifos.test.acceptance.framework.loan.CreateLoanAccountSearchParameters in project head by mifos.
the class CreateLSIMClientLoanAccountTest method newWeeklyLSIMClientLoanAccount.
@Test(enabled = true, groups = { "loan", "acceptance", "ui" })
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
public // http://mifosforge.jira.com/browse/MIFOSTEST-127
void newWeeklyLSIMClientLoanAccount() throws Exception {
CreateLoanAccountSearchParameters searchParameters = new CreateLoanAccountSearchParameters();
searchParameters.setSearchString("Stu1233171716380 Client1233171716380");
searchParameters.setLoanProduct("WeeklyFlatLoanWithOneTimeFees");
expectedDate = "29-Jan-2010";
CreateLoanAccountSubmitParameters submitAccountParameters = new CreateLoanAccountSubmitParameters();
submitAccountParameters.setAmount("9012.0");
submitAccountParameters.setLsimFrequencyWeeks("on");
submitAccountParameters.setLsimWeekFrequency("1");
submitAccountParameters.setLsimWeekDay("Friday");
submitAccountParameters.setLoanPurpose("0008-Animal Trading");
createLSIMLoanAndCheckAmountAndInstallmentDate(searchParameters, submitAccountParameters, expectedDate);
}
use of org.mifos.test.acceptance.framework.loan.CreateLoanAccountSearchParameters in project head by mifos.
the class ProperLoanProductCalculationsTest method verifyProperCalculationsFixedProductNonDefaultProperties.
/**
* Verify declining balance, fixed payment interest loan with non-default
* accounting rules for digits after decimals and rounding mode properties are
* used to generate and present calculations accurately and are reflected in Admin System Information.
* http://mifosforge.jira.com/browse/MIFOSTEST-70
* @throws Exception
*/
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
public void verifyProperCalculationsFixedProductNonDefaultProperties() throws Exception {
customPropertiesHelper.setDigitsAfterDecimal(2);
customPropertiesHelper.setCurrencyRoundingMode(CustomPropertiesHelper.ROUNDING_MODE_FLOOR);
customPropertiesHelper.setInitialRoundingMode(CustomPropertiesHelper.ROUNDING_MODE_HALF_UP);
customPropertiesHelper.setFinalRoundingMode(CustomPropertiesHelper.ROUNDING_MODE_HALF_UP);
customPropertiesHelper.setInitialRoundOffMultiple("0.5");
customPropertiesHelper.setFinalRoundOffMultiple("0.1");
DefineNewLoanProductPage.SubmitFormParameters productParams = FormParametersHelper.getWeeklyLoanProductParameters();
String productName = "LoanProduct" + StringUtil.getRandomString(5);
productParams.setOfferingName(productName);
productParams.setOfferingShortName(StringUtil.getRandomString(4));
productParams.setDefaultInterestRate("9.5");
productParams.setMinInterestRate("5");
productParams.setInterestTypes(SubmitFormParameters.DECLINING_BALANCE_EPI);
productParams.setDefaultLoanAmount("19999.9");
productParams.setDefInstallments("79");
productParams.setMaxInstallments("79");
CreateLoanAccountSearchParameters searchParams = new CreateLoanAccountSearchParameters();
searchParams.setSearchString("Stu1233266063395 Client1233266063395");
searchParams.setLoanProduct(productName);
loanProductTestHelper.defineNewLoanProduct(productParams);
LoanAccountPage loanAccountPage = loanTestHelper.createAndActivateDefaultLoanAccount(searchParams);
loanAccountPage.verifyPrincipalOriginal("19,999.9");
loanAccountPage.verifyInterestOriginal("1,457.5");
loanAccountPage.verifyFeesOriginal("0");
loanAccountPage.verifyPenaltyOriginal("0");
loanAccountPage.verifyTotalOriginalLoan("21457.4");
}
use of org.mifos.test.acceptance.framework.loan.CreateLoanAccountSearchParameters in project head by mifos.
the class ProperLoanProductCalculationsTest method verifyProperInterestAndPaymentWeeklyDecliningBalanceProduct.
/**
* Declining balance, fixed payment type weekly loan calculates and
* displays proper interest and payment information.
* http://mifosforge.jira.com/browse/MIFOSTEST-66
* @throws Exception
*/
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
public void verifyProperInterestAndPaymentWeeklyDecliningBalanceProduct() throws Exception {
DefineNewLoanProductPage.SubmitFormParameters productParams = FormParametersHelper.getWeeklyLoanProductParameters();
String productName = "LoanProduct" + StringUtil.getRandomString(5);
productParams.setOfferingName(productName);
productParams.setOfferingShortName(StringUtil.getRandomString(4));
productParams.setDefaultInterestRate("15.3");
productParams.setMaxInterestRate("50");
productParams.setInterestTypes(SubmitFormParameters.DECLINING_BALANCE);
productParams.setDefaultLoanAmount("13333");
productParams.setDefInstallments("13");
CreateLoanAccountSearchParameters searchParams = new CreateLoanAccountSearchParameters();
searchParams.setSearchString("Stu1233266063395 Client1233266063395");
searchParams.setLoanProduct(productName);
loanProductTestHelper.defineNewLoanProduct(productParams);
LoanAccountPage loanAccountPage = loanTestHelper.createAndActivateDefaultLoanAccount(searchParams);
loanAccountPage.verifyPrincipalOriginal("13,333");
loanAccountPage.verifyInterestOriginal("276");
loanAccountPage.verifyFeesOriginal("0");
loanAccountPage.verifyPenaltyOriginal("0");
loanAccountPage.verifyTotalOriginalLoan("13609.0");
}
Aggregations