Search in sources :

Example 6 with ChargeParameters

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");
}
Also used : CreateLoanAccountSearchParameters(org.mifos.test.acceptance.framework.loan.CreateLoanAccountSearchParameters) ChargeParameters(org.mifos.test.acceptance.framework.loan.ChargeParameters)

Example 7 with ChargeParameters

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");
}
Also used : CreateLoanAccountSearchParameters(org.mifos.test.acceptance.framework.loan.CreateLoanAccountSearchParameters) ChargeParameters(org.mifos.test.acceptance.framework.loan.ChargeParameters)

Example 8 with ChargeParameters

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);
}
Also used : NavigationHelper(org.mifos.test.acceptance.framework.testhelpers.NavigationHelper) LoanAccountPage(org.mifos.test.acceptance.framework.loan.LoanAccountPage) ChargeParameters(org.mifos.test.acceptance.framework.loan.ChargeParameters)

Example 9 with ChargeParameters

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");
}
Also used : LoanAccountPage(org.mifos.test.acceptance.framework.loan.LoanAccountPage) ChargeParameters(org.mifos.test.acceptance.framework.loan.ChargeParameters)

Example 10 with ChargeParameters

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);
}
Also used : NavigationHelper(org.mifos.test.acceptance.framework.testhelpers.NavigationHelper) LoanAccountPage(org.mifos.test.acceptance.framework.loan.LoanAccountPage) DateTimeUpdaterRemoteTestingService(org.mifos.test.acceptance.remote.DateTimeUpdaterRemoteTestingService) PenaltyHelper(org.mifos.test.acceptance.framework.testhelpers.PenaltyHelper) ChargeParameters(org.mifos.test.acceptance.framework.loan.ChargeParameters) DateTime(org.joda.time.DateTime)

Aggregations

ChargeParameters (org.mifos.test.acceptance.framework.loan.ChargeParameters)15 LoanAccountPage (org.mifos.test.acceptance.framework.loan.LoanAccountPage)8 DateTime (org.joda.time.DateTime)6 CreateLoanAccountSearchParameters (org.mifos.test.acceptance.framework.loan.CreateLoanAccountSearchParameters)5 PaymentParameters (org.mifos.test.acceptance.framework.loan.PaymentParameters)3 NavigationHelper (org.mifos.test.acceptance.framework.testhelpers.NavigationHelper)3 DateTimeUpdaterRemoteTestingService (org.mifos.test.acceptance.remote.DateTimeUpdaterRemoteTestingService)3 Test (org.testng.annotations.Test)3 ArrayList (java.util.ArrayList)2 ApplyPaymentConfirmationPage (org.mifos.test.acceptance.framework.loan.ApplyPaymentConfirmationPage)2 DisburseLoanParameters (org.mifos.test.acceptance.framework.loan.DisburseLoanParameters)2 CreateCenterEnterDataPage (org.mifos.test.acceptance.framework.center.CreateCenterEnterDataPage)1 MeetingParameters (org.mifos.test.acceptance.framework.center.MeetingParameters)1 ViewCenterChargesDetailPage (org.mifos.test.acceptance.framework.center.ViewCenterChargesDetailPage)1 ApplyChargesPage (org.mifos.test.acceptance.framework.client.ApplyChargesPage)1 CreateHolidaySubmitParameters (org.mifos.test.acceptance.framework.holiday.CreateHolidayEntryPage.CreateHolidaySubmitParameters)1 ApplyPaymentPage (org.mifos.test.acceptance.framework.loan.ApplyPaymentPage)1 EditPreviewLoanAccountPage (org.mifos.test.acceptance.framework.loan.EditPreviewLoanAccountPage)1 GLIMClient (org.mifos.test.acceptance.framework.loan.GLIMClient)1 DefineNewLoanProductPage (org.mifos.test.acceptance.framework.loanproduct.DefineNewLoanProductPage)1