Search in sources :

Example 31 with CreateLoanAccountSubmitParameters

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

the class CreateClientLoanAccountTest method newWeeklyClientLoanAccountWithModifyErrors.

@SuppressWarnings("PMD.SignatureDeclareThrowsException")
// add grace period of 10 to "Flat Interest Loan Product With Fee"
@Test(enabled = true)
public void newWeeklyClientLoanAccountWithModifyErrors() throws Exception {
    setAppDate(new DateTime(2011, 3, 7, 15, 0, 0, 0));
    CreateLoanAccountSearchParameters searchParameters = new CreateLoanAccountSearchParameters();
    searchParameters.setSearchString("client1 lastname");
    searchParameters.setLoanProduct("Flat Interest Loan Product With Fee");
    CreateLoanAccountSubmitParameters submitAccountParameters = new CreateLoanAccountSubmitParameters();
    submitAccountParameters.setAmount("1012.0");
    String loanId = createLoanAndCheckAmount(searchParameters, submitAccountParameters, null);
    submitAccountParameters.setAmount("10666.0");
    EditLoanAccountInformationParameters editAccountParameters = new EditLoanAccountInformationParameters();
    editAccountParameters.setGracePeriod("15");
    EditLoanAccountInformationPage editPreviewLoanAccountPage = loanTestHelper.changeLoanAccountInformationWithErrors(loanId, submitAccountParameters, editAccountParameters);
    editPreviewLoanAccountPage.verifyErrorInForm("Please specify valid Amount. Amount should be a value between 1 and 10,000, inclusive");
    editPreviewLoanAccountPage.verifyErrorInForm("Please specify valid Grace period for repayments. Grace period for repayments should be a value less than 12");
}
Also used : CreateLoanAccountSearchParameters(org.mifos.test.acceptance.framework.loan.CreateLoanAccountSearchParameters) EditLoanAccountInformationPage(org.mifos.test.acceptance.framework.loan.EditLoanAccountInformationPage) CreateLoanAccountSubmitParameters(org.mifos.test.acceptance.framework.loan.CreateLoanAccountSubmitParameters) EditLoanAccountInformationParameters(org.mifos.test.acceptance.framework.loan.EditLoanAccountInformationParameters) DateTime(org.joda.time.DateTime) Test(org.testng.annotations.Test)

Example 32 with CreateLoanAccountSubmitParameters

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

the class CreateClientLoanAccountTest method newMonthlyClientLoanAccountWithMeetingOnSpecificDayOfMonth.

@SuppressWarnings("PMD.SignatureDeclareThrowsException")
//http://mifosforge.jira.com/browse/MIFOSTEST-308
@Test(enabled = true)
public void newMonthlyClientLoanAccountWithMeetingOnSpecificDayOfMonth() throws Exception {
    //Given
    DateTimeUpdaterRemoteTestingService dateTimeUpdaterRemoteTestingService = new DateTimeUpdaterRemoteTestingService(selenium);
    DateTime targetTime = new DateTime(2011, 2, 1, 13, 0, 0, 0);
    dateTimeUpdaterRemoteTestingService.setDateTime(targetTime);
    CreateLoanAccountSearchParameters searchParameters = new CreateLoanAccountSearchParameters();
    searchParameters.setSearchString("Client - Mary Monthly");
    searchParameters.setLoanProduct("MonthlyClientFlatLoan1stOfMonth");
    CreateLoanAccountSubmitParameters submitAccountParameters = new CreateLoanAccountSubmitParameters();
    submitAccountParameters.setAmount("1234.0");
    submitAccountParameters.setGracePeriodTypeNone(true);
    //Then
    String loanId = createLoanAndCheckAmount(searchParameters, submitAccountParameters, null);
    getLoanStatusActive(loanId);
}
Also used : CreateLoanAccountSearchParameters(org.mifos.test.acceptance.framework.loan.CreateLoanAccountSearchParameters) CreateLoanAccountSubmitParameters(org.mifos.test.acceptance.framework.loan.CreateLoanAccountSubmitParameters) DateTimeUpdaterRemoteTestingService(org.mifos.test.acceptance.remote.DateTimeUpdaterRemoteTestingService) DateTime(org.joda.time.DateTime) Test(org.testng.annotations.Test)

Example 33 with CreateLoanAccountSubmitParameters

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

the class CreateClientLoanAccountTest method newLoanAccountWithThousandSeparator.

@SuppressWarnings("PMD.SignatureDeclareThrowsException")
@Test(enabled = true)
public void newLoanAccountWithThousandSeparator() throws Exception {
    //Given
    DateTimeUpdaterRemoteTestingService dateTimeUpdaterRemoteTestingService = new DateTimeUpdaterRemoteTestingService(selenium);
    DateTime targetTime = new DateTime(2011, 2, 1, 13, 0, 0, 0);
    dateTimeUpdaterRemoteTestingService.setDateTime(targetTime);
    CreateLoanAccountSearchParameters searchParameters = new CreateLoanAccountSearchParameters();
    searchParameters.setSearchString("Client - Mary Monthly");
    searchParameters.setLoanProduct("MonthlyClientFlatLoan1stOfMonth");
    CreateLoanAccountSubmitParameters submitAccountParameters = new CreateLoanAccountSubmitParameters();
    submitAccountParameters.setAmount("1,234.0");
    submitAccountParameters.setGracePeriodTypeNone(true);
    //Then
    createLoanAndCheckAmount(searchParameters, submitAccountParameters, null);
}
Also used : CreateLoanAccountSearchParameters(org.mifos.test.acceptance.framework.loan.CreateLoanAccountSearchParameters) CreateLoanAccountSubmitParameters(org.mifos.test.acceptance.framework.loan.CreateLoanAccountSubmitParameters) DateTimeUpdaterRemoteTestingService(org.mifos.test.acceptance.remote.DateTimeUpdaterRemoteTestingService) DateTime(org.joda.time.DateTime) Test(org.testng.annotations.Test)

Example 34 with CreateLoanAccountSubmitParameters

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

the class CreateClientLoanAccountTest method newWeeklyClientLoanAccountWithDateTypeCustomField.

@Test(singleThreaded = true, groups = { "loan", "acceptance", "ui" })
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
public void newWeeklyClientLoanAccountWithDateTypeCustomField() throws Exception {
    CreateLoanAccountSearchParameters searchParameters = new CreateLoanAccountSearchParameters();
    searchParameters.setSearchString("client1 lastname");
    searchParameters.setLoanProduct("Flat Interest Loan Product With Fee");
    CreateLoanAccountSubmitParameters submitAccountParameters = new CreateLoanAccountSubmitParameters();
    submitAccountParameters.setAmount("1012.0");
    String loanId = createLoanAndCheckAmount(searchParameters, submitAccountParameters, null);
    submitAccountParameters.setAmount("1666.0");
    EditLoanAccountInformationParameters editAccountParameters = new EditLoanAccountInformationParameters();
    editAccountParameters.setGracePeriod("5");
    loanTestHelper.changeLoanAccountInformation(loanId, submitAccountParameters, editAccountParameters);
}
Also used : CreateLoanAccountSearchParameters(org.mifos.test.acceptance.framework.loan.CreateLoanAccountSearchParameters) CreateLoanAccountSubmitParameters(org.mifos.test.acceptance.framework.loan.CreateLoanAccountSubmitParameters) EditLoanAccountInformationParameters(org.mifos.test.acceptance.framework.loan.EditLoanAccountInformationParameters) Test(org.testng.annotations.Test)

Example 35 with CreateLoanAccountSubmitParameters

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

the class CreateClientLoanAccountTest method newMonthlyClientLoanAccountWithZeroInterestRate.

@SuppressWarnings("PMD.SignatureDeclareThrowsException")
@Test(singleThreaded = true, groups = { "loan", "acceptance", "ui" })
public void newMonthlyClientLoanAccountWithZeroInterestRate() throws Exception {
    CreateLoanAccountSearchParameters searchParameters = new CreateLoanAccountSearchParameters();
    searchParameters.setSearchString("Client - Mary Monthly");
    searchParameters.setLoanProduct("EmergencyLoanWithZeroInterest");
    CreateLoanAccountSubmitParameters submitAccountParameters = new CreateLoanAccountSubmitParameters();
    submitAccountParameters.setAmount("1000.0");
    submitAccountParameters.setGracePeriodTypeNone(true);
    createLoanAndCheckAmount(searchParameters, submitAccountParameters, null);
}
Also used : CreateLoanAccountSearchParameters(org.mifos.test.acceptance.framework.loan.CreateLoanAccountSearchParameters) CreateLoanAccountSubmitParameters(org.mifos.test.acceptance.framework.loan.CreateLoanAccountSubmitParameters) Test(org.testng.annotations.Test)

Aggregations

CreateLoanAccountSubmitParameters (org.mifos.test.acceptance.framework.loan.CreateLoanAccountSubmitParameters)39 CreateLoanAccountSearchParameters (org.mifos.test.acceptance.framework.loan.CreateLoanAccountSearchParameters)36 Test (org.testng.annotations.Test)31 DateTime (org.joda.time.DateTime)18 LoanAccountPage (org.mifos.test.acceptance.framework.loan.LoanAccountPage)14 DateTimeUpdaterRemoteTestingService (org.mifos.test.acceptance.remote.DateTimeUpdaterRemoteTestingService)9 CreateLoanAccountEntryPage (org.mifos.test.acceptance.framework.loan.CreateLoanAccountEntryPage)5 EditLoanAccountInformationParameters (org.mifos.test.acceptance.framework.loan.EditLoanAccountInformationParameters)5 ViewRepaymentSchedulePage (org.mifos.test.acceptance.framework.loan.ViewRepaymentSchedulePage)5 ArrayList (java.util.ArrayList)4 CreateHolidaySubmitParameters (org.mifos.test.acceptance.framework.holiday.CreateHolidayEntryPage.CreateHolidaySubmitParameters)4 CreateLoanAccountConfirmationPage (org.mifos.test.acceptance.framework.loan.CreateLoanAccountConfirmationPage)4 CreateLoanAccountPreviewPage (org.mifos.test.acceptance.framework.loan.CreateLoanAccountPreviewPage)4 CreateLoanAccountSearchPage (org.mifos.test.acceptance.framework.loan.CreateLoanAccountSearchPage)4 DisburseLoanParameters (org.mifos.test.acceptance.framework.loan.DisburseLoanParameters)4 EditLoanAccountInformationPage (org.mifos.test.acceptance.framework.loan.EditLoanAccountInformationPage)4 LoanTestHelper (org.mifos.test.acceptance.framework.testhelpers.LoanTestHelper)4 ClientsAndAccountsHomepage (org.mifos.test.acceptance.framework.ClientsAndAccountsHomepage)3 CreateLoanAccountReviewInstallmentPage (org.mifos.test.acceptance.framework.loan.CreateLoanAccountReviewInstallmentPage)3 EditLoanAccountStatusParameters (org.mifos.test.acceptance.framework.loan.EditLoanAccountStatusParameters)3