Search in sources :

Example 91 with CreateLoanAccountSearchParameters

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

Example 92 with CreateLoanAccountSearchParameters

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

Example 93 with CreateLoanAccountSearchParameters

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();
    }
}
Also used : CreateLoanAccountSearchParameters(org.mifos.test.acceptance.framework.loan.CreateLoanAccountSearchParameters) ArrayList(java.util.ArrayList) GLIMClient(org.mifos.test.acceptance.framework.loan.GLIMClient) LoanAccountPage(org.mifos.test.acceptance.framework.loan.LoanAccountPage) DateTimeUpdaterRemoteTestingService(org.mifos.test.acceptance.remote.DateTimeUpdaterRemoteTestingService) DateTime(org.joda.time.DateTime) ChargeParameters(org.mifos.test.acceptance.framework.loan.ChargeParameters)

Example 94 with CreateLoanAccountSearchParameters

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

Example 95 with CreateLoanAccountSearchParameters

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

Aggregations

CreateLoanAccountSearchParameters (org.mifos.test.acceptance.framework.loan.CreateLoanAccountSearchParameters)95 LoanAccountPage (org.mifos.test.acceptance.framework.loan.LoanAccountPage)50 Test (org.testng.annotations.Test)46 CreateLoanAccountSubmitParameters (org.mifos.test.acceptance.framework.loan.CreateLoanAccountSubmitParameters)36 DateTime (org.joda.time.DateTime)35 DisburseLoanParameters (org.mifos.test.acceptance.framework.loan.DisburseLoanParameters)26 CreateLoanAccountEntryPage (org.mifos.test.acceptance.framework.loan.CreateLoanAccountEntryPage)22 DefineNewLoanProductPage (org.mifos.test.acceptance.framework.loanproduct.DefineNewLoanProductPage)22 SubmitFormParameters (org.mifos.test.acceptance.framework.loanproduct.DefineNewLoanProductPage.SubmitFormParameters)19 DateTimeUpdaterRemoteTestingService (org.mifos.test.acceptance.remote.DateTimeUpdaterRemoteTestingService)19 CreateLoanAccountConfirmationPage (org.mifos.test.acceptance.framework.loan.CreateLoanAccountConfirmationPage)13 CreateLoanAccountPreviewPage (org.mifos.test.acceptance.framework.loan.CreateLoanAccountPreviewPage)12 CreateLoanAccountSearchPage (org.mifos.test.acceptance.framework.loan.CreateLoanAccountSearchPage)12 ClientsAndAccountsHomepage (org.mifos.test.acceptance.framework.ClientsAndAccountsHomepage)11 CreateLoanAccountReviewInstallmentPage (org.mifos.test.acceptance.framework.loan.CreateLoanAccountReviewInstallmentPage)11 ArrayList (java.util.ArrayList)9 EditLoanAccountStatusParameters (org.mifos.test.acceptance.framework.loan.EditLoanAccountStatusParameters)8 ViewRepaymentSchedulePage (org.mifos.test.acceptance.framework.loan.ViewRepaymentSchedulePage)8 LoanProductDetailsPage (org.mifos.test.acceptance.framework.loanproduct.LoanProductDetailsPage)8 EditLoanAccountInformationPage (org.mifos.test.acceptance.framework.loan.EditLoanAccountInformationPage)7