コード例 #1
0
 private String createMonthlyLoanProduct() {
   SubmitFormParameters formParameters = FormParametersHelper.getMonthlyLoanProductParameters();
   formParameters.setOfferingShortName(StringUtil.getRandomString(4));
   String loanName = formParameters.getOfferingName();
   loginAndNavigateToAdminPage()
       .navigateToDefineLoanProduct()
       .fillLoanParameters(formParameters)
       .submitAndGotoNewLoanProductPreviewPage()
       .submit();
   return loanName;
 }
コード例 #2
0
 @SuppressWarnings("PMD.SignatureDeclareThrowsException")
 @Test(enabled = true)
 public void changeDigitsAfterDecimalForInterestToThree() throws Exception {
   propertiesHelper.setDigitsAfterDecimalForInterest(3);
   SubmitFormParameters submitFormParameters =
       FormParametersHelper.getWeeklyLoanProductParameters();
   submitFormParameters.setMaxInterestRate("6.33333"); // invalid value
   submitFormParameters.setMinInterestRate("1");
   submitFormParameters.setDefaultInterestRate("3");
   verifyInvalidInterestInLoanProduct(submitFormParameters, false);
   propertiesHelper.setDigitsAfterDecimalForInterest(5);
 }
コード例 #3
0
 @SuppressWarnings("PMD.SignatureDeclareThrowsException")
 @Test(enabled = true)
 public void changeMaxInterestRateToFive() throws Exception {
   propertiesHelper.setMaxInterest(5);
   SubmitFormParameters submitFormParameters =
       FormParametersHelper.getWeeklyLoanProductParameters();
   submitFormParameters.setMaxInterestRate("12"); // invalid value
   submitFormParameters.setMinInterestRate("1");
   submitFormParameters.setDefaultInterestRate("3");
   verifyInvalidInterestInLoanProduct(submitFormParameters, true);
   propertiesHelper.setMaxInterest(999);
 }
コード例 #4
0
  @SuppressWarnings("PMD.SignatureDeclareThrowsException")
  // one of the dependent methods throws Exception
  public void editExistingLoanProduct() throws Exception {
    initRemote.dataLoadAndCacheRefresh(
        dbUnitUtilities, "acceptance_small_001_dbunit.xml", dataSource, selenium);
    ViewLoanProductsPage viewLoanProducts = loginAndNavigateToViewLoanProductsPage();
    LoanProductDetailsPage loanProductDetailsPage =
        viewLoanProducts.viewLoanProductDetails("FlatInterestLoanProduct1");
    EditLoanProductPage editLoanProductPage = loanProductDetailsPage.editLoanProduct();
    editLoanProductPage.verifyPage();
    SubmitFormParameters formParameters = new SubmitFormParameters();
    formParameters.setDescription("Modified Description");
    formParameters.setMaxInterestRate("44");
    formParameters.setMinInterestRate("3");
    formParameters.setDefaultInterestRate("18");

    EditLoanProductPreviewPage editLoanProductPreviewPage =
        editLoanProductPage.submitDescriptionAndInterestChanges(formParameters);
    loanProductDetailsPage = editLoanProductPreviewPage.submit();
    loanProductDetailsPage.verifyPage();
    loanProductDetailsPage.editLoanProduct();
    editLoanProductPage.verifyPage();
    editLoanProductPage.verifyModifiedDescriptionAndInterest(formParameters);
  }