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();
}
Aggregations