Search in sources :

Example 16 with PaymentParameters

use of org.mifos.test.acceptance.framework.loan.PaymentParameters in project head by mifos.

the class LoanProcessWithDifferentCurrencyTest method applyPayment.

private void applyPayment(String loanAccountId) {
    PaymentParameters paymentParameters = new PaymentParameters();
    // interest + principal
    paymentParameters.setAmount("1018");
    paymentParameters.setTransactionDateDD("17");
    paymentParameters.setTransactionDateMM("02");
    paymentParameters.setTransactionDateYYYY("2011");
    paymentParameters.setPaymentType(PaymentParameters.CASH);
    loanTestHelper.applyPayment(loanAccountId, paymentParameters);
}
Also used : PaymentParameters(org.mifos.test.acceptance.framework.loan.PaymentParameters)

Example 17 with PaymentParameters

use of org.mifos.test.acceptance.framework.loan.PaymentParameters in project head by mifos.

the class RemovePenaltiesTest method shouldWaivedPenaltyOverDueOnLoanAccountAfterPayment.

@Test(enabled = true)
public void shouldWaivedPenaltyOverDueOnLoanAccountAfterPayment() throws Exception {
    final String accountId = setUpPenaltyAndLoanAccount(true, PenaltyFormParameters.FREQUENCY_WEEKLY);
    PaymentParameters param = new PaymentParameters();
    param.setAmount("285");
    param.setPaymentType(PaymentParameters.CASH);
    param.setTransactionDateDD("01");
    param.setTransactionDateMM("04");
    param.setTransactionDateYYYY("2012");
    navigationHelper.navigateToLoanAccountPage(accountId).navigateToApplyPayment().submitAndNavigateToApplyPaymentConfirmationPage(param).submitAndNavigateToLoanAccountDetailsPage();
    navigationHelper.navigateToLoanAccountPage(accountId).navigateToViewInstallmentDetails().waiveOverdueInstallmentPenalty();
    penaltyHelper.verifyCalculatePenaltyWithPayment(accountId, new String[] { "35", "35", "0" }, new String[][] { { "35", "285" }, null, /* Installments due */
    { "0", "250" }, { "0", "250" }, { "0", "250" }, { "0", "250" }, { "0", "250" }, { "0", "250" }, null, /* Future Installments */
    { "0", "250" }, { "0", "250" }, { "0", "250" } }, new String[] { "1,750", "05/04/2012", "1,500" });
}
Also used : PaymentParameters(org.mifos.test.acceptance.framework.loan.PaymentParameters) Test(org.testng.annotations.Test)

Example 18 with PaymentParameters

use of org.mifos.test.acceptance.framework.loan.PaymentParameters in project head by mifos.

the class RemovePenaltiesTest method shouldNotWaivedPenaltyOverDueOnLoanAccountAfterFullPayment.

@Test(enabled = true)
public void shouldNotWaivedPenaltyOverDueOnLoanAccountAfterFullPayment() throws Exception {
    final String accountId = setUpPenaltyAndLoanAccount(true, PenaltyFormParameters.FREQUENCY_WEEKLY);
    PaymentParameters param = new PaymentParameters();
    param.setAmount("1,890");
    param.setPaymentType(PaymentParameters.CASH);
    param.setTransactionDateDD("01");
    param.setTransactionDateMM("04");
    param.setTransactionDateYYYY("2012");
    navigationHelper.navigateToLoanAccountPage(accountId).navigateToApplyPayment().submitAndNavigateToApplyPaymentConfirmationPage(param).submitAndNavigateToLoanAccountDetailsPage();
    Assert.assertTrue(!navigationHelper.navigateToLoanAccountPage(accountId).navigateToViewInstallmentDetails().isWaiveOverdueInstallmentPenalty());
    penaltyHelper.verifyCalculatePenaltyWithPayment(accountId, new String[] { "140", "140", "0" }, new String[][] { { "35", "285" }, { "30", "280" }, { "25", "275" }, { "20", "270" }, { "15", "265" }, { "10", "260" }, { "5", "255" }, null, /* Future Installments */
    { "0", "250" }, { "0", "250" }, { "0", "250" } }, new String[] { "250", "05/04/2012", "0" });
}
Also used : PaymentParameters(org.mifos.test.acceptance.framework.loan.PaymentParameters) Test(org.testng.annotations.Test)

Aggregations

PaymentParameters (org.mifos.test.acceptance.framework.loan.PaymentParameters)18 LoanAccountPage (org.mifos.test.acceptance.framework.loan.LoanAccountPage)9 CreateLoanAccountSearchParameters (org.mifos.test.acceptance.framework.loan.CreateLoanAccountSearchParameters)7 DisburseLoanParameters (org.mifos.test.acceptance.framework.loan.DisburseLoanParameters)7 Test (org.testng.annotations.Test)6 DateTime (org.joda.time.DateTime)5 ApplyPaymentPage (org.mifos.test.acceptance.framework.loan.ApplyPaymentPage)4 DateTimeUpdaterRemoteTestingService (org.mifos.test.acceptance.remote.DateTimeUpdaterRemoteTestingService)4 ApplyPaymentConfirmationPage (org.mifos.test.acceptance.framework.loan.ApplyPaymentConfirmationPage)3 ChargeParameters (org.mifos.test.acceptance.framework.loan.ChargeParameters)3 EditPreviewLoanAccountPage (org.mifos.test.acceptance.framework.loan.EditPreviewLoanAccountPage)3 CreateLoanAccountEntryPage (org.mifos.test.acceptance.framework.loan.CreateLoanAccountEntryPage)2 EditLoanAccountStatusParameters (org.mifos.test.acceptance.framework.loan.EditLoanAccountStatusParameters)2 ViewRepaymentSchedulePage (org.mifos.test.acceptance.framework.loan.ViewRepaymentSchedulePage)2 SubmitFormParameters (org.mifos.test.acceptance.framework.loanproduct.DefineNewLoanProductPage.SubmitFormParameters)2 LocalDate (org.joda.time.LocalDate)1 ManageRolePage (org.mifos.test.acceptance.framework.admin.ManageRolePage)1 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