Search in sources :

Example 1 with NumberFormatter

use of org.springframework.format.number.NumberFormatter in project head by mifos.

the class LoanTestHelper method createAndActivateDefaultLoanAccount.

public LoanAccountPage createAndActivateDefaultLoanAccount(CreateLoanAccountSearchParameters searchParams) {
    CreateLoanAccountEntryPage createLoanAccountEntryPage = navigationHelper.navigateToClientsAndAccountsPage().navigateToCreateLoanAccountUsingLeftMenu().searchAndNavigateToCreateLoanAccountPage(searchParams);
    createLoanAccountEntryPage.setLonaPurpose("0013-Hybrid Cow");
    Double loanAmountDouble = Double.valueOf(createLoanAccountEntryPage.getLoanAmount());
    String loanAmount = new NumberFormatter().print(loanAmountDouble, Locale.ENGLISH);
    CreateLoanAccountReviewInstallmentPage createLoanAccountReviewInstallmentPage = createLoanAccountEntryPage.clickContinue();
    createLoanAccountReviewInstallmentPage = createLoanAccountReviewInstallmentPage.verifyPage();
    createLoanAccountReviewInstallmentPage.verifyLoanAmount(loanAmount);
    CreateLoanAccountPreviewPage createLoanAccountPreviewPage = createLoanAccountReviewInstallmentPage.clickPreviewAndGoToReviewLoanAccountPage();
    createLoanAccountPreviewPage.verifyLoanAmount(loanAmount);
    return createLoanAccountPreviewPage.submit().navigateToLoanAccountDetailsPage().changeAccountStatusToAccepted();
}
Also used : CreateLoanAccountPreviewPage(org.mifos.test.acceptance.framework.loan.CreateLoanAccountPreviewPage) CreateLoanAccountReviewInstallmentPage(org.mifos.test.acceptance.framework.loan.CreateLoanAccountReviewInstallmentPage) CreateLoanAccountEntryPage(org.mifos.test.acceptance.framework.loan.CreateLoanAccountEntryPage) NumberFormatter(org.springframework.format.number.NumberFormatter)

Aggregations

CreateLoanAccountEntryPage (org.mifos.test.acceptance.framework.loan.CreateLoanAccountEntryPage)1 CreateLoanAccountPreviewPage (org.mifos.test.acceptance.framework.loan.CreateLoanAccountPreviewPage)1 CreateLoanAccountReviewInstallmentPage (org.mifos.test.acceptance.framework.loan.CreateLoanAccountReviewInstallmentPage)1 NumberFormatter (org.springframework.format.number.NumberFormatter)1