use of org.mifos.test.acceptance.framework.loan.ChargeParameters in project head by mifos.
the class FeeTest method applyAndWaiveFee.
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
public void applyAndWaiveFee() throws Exception {
// approved loan
String accountId = "000100000000047";
CreateLoanAccountSearchParameters searchParams = new CreateLoanAccountSearchParameters();
searchParams.setSearchString(accountId);
ChargeParameters feeParameters = new ChargeParameters();
feeParameters.setAmount("15");
feeParameters.setType(ChargeParameters.MISC_FEES);
loanTestHelper.verifyOriginalValues(searchParams, "10,000", "461", "0", "0", "10461.0");
loanTestHelper.applyCharge(accountId, feeParameters);
loanTestHelper.verifyOriginalValues(searchParams, "10,000", "461", "15", "0", "10476.0");
loanTestHelper.waiveFee(accountId);
loanTestHelper.verifyOriginalValues(searchParams, "10,000", "461", "0", "0", "10461.0");
}
use of org.mifos.test.acceptance.framework.loan.ChargeParameters in project head by mifos.
the class FeeTest method applyFee.
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
public void applyFee() throws Exception {
// approved loan
String accountId = "000100000000046";
CreateLoanAccountSearchParameters searchParams = new CreateLoanAccountSearchParameters();
searchParams.setSearchString(accountId);
ChargeParameters params = new ChargeParameters();
params.setType(ChargeParameters.MISC_FEES);
params.setAmount("10");
loanTestHelper.verifyOriginalValues(searchParams, "10,000", "461", "0", "0", "10461.0");
loanTestHelper.applyCharge(accountId, params);
loanTestHelper.verifyOriginalValues(searchParams, "10,000", "461", "10", "0", "10471.0");
}
use of org.mifos.test.acceptance.framework.loan.ChargeParameters in project head by mifos.
the class PenaltyTest method applyAndWaivePenaltyOnDisbursedLoan.
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
public void applyAndWaivePenaltyOnDisbursedLoan() throws Exception {
String accountId = "000100000000039";
ChargeParameters feeParameters = new ChargeParameters();
feeParameters.setAmount("15");
feeParameters.setType(ChargeParameters.MISC_PENALTY);
LoanAccountPage loanAccountPage = loanTestHelper.applyCharge(accountId, feeParameters);
verifySummaryAndActivity(loanAccountPage, "15", "15", "Misc penalty applied", 2);
loanTestHelper.waivePenalty(accountId);
loanAccountPage = new NavigationHelper(selenium).navigateToLoanAccountPage(accountId);
verifySummaryAndActivity(loanAccountPage, "15", "0", "Penalty waived", 2);
}
use of org.mifos.test.acceptance.framework.loan.ChargeParameters in project head by mifos.
the class PenaltyTest method applyPenaltyOnApprovedLoan.
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
public void applyPenaltyOnApprovedLoan() throws Exception {
ChargeParameters params = new ChargeParameters();
params.setType(ChargeParameters.MISC_PENALTY);
params.setAmount("10");
LoanAccountPage loanAccountPage = loanTestHelper.applyCharge("000100000000038", params);
verifySummaryAndActivity(loanAccountPage, "10", "10", "Misc penalty applied", 2);
loanAccountPage.navigateBack();
verifyRepaymentSchelude(loanAccountPage, "10", "7", "3");
}
use of org.mifos.test.acceptance.framework.loan.ChargeParameters in project head by mifos.
the class PenaltyTest method canRemoveAutomaticPenaltyAfterPaymentHasBeenMade.
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
public void canRemoveAutomaticPenaltyAfterPaymentHasBeenMade() throws Exception {
LoanAccountPage loanAccountPage = prepareLoanForPenaltyTest();
String accountId = loanAccountPage.getAccountId();
PenaltyHelper penaltyHelper = new PenaltyHelper(selenium);
String penaltyName = "Penalty_" + StringUtil.getRandomString(6);
penaltyHelper.createRatePenalty(penaltyName, PenaltyFormParameters.PERIOD_NONE, "", PenaltyFormParameters.FREQUENCY_MONTHLY, "33.3", PenaltyFormParameters.FORMULA_OVERDUE_AMOUNT, "0", "9999999");
ChargeParameters chargeParams = new ChargeParameters();
chargeParams.setType(penaltyName);
chargeParams.setAmount("");
NavigationHelper navigationHelper = new NavigationHelper(selenium);
loanAccountPage = navigationHelper.navigateToLoanAccountPage(accountId);
loanTestHelper.applyChargeUsingFeeLabel(accountId, chargeParams);
new DateTimeUpdaterRemoteTestingService(selenium).setDateTime(new DateTime().plusYears(1));
loanAccountPage = navigationHelper.navigateToLoanAccountPage(accountId);
loanAccountPage = loanAccountPage.removePenalty(1);
loanAccountPage.verifyNoPenaltyRemovalLinkExists(1);
}
Aggregations