Search in sources :

Example 11 with CreateHolidaySubmitParameters

use of org.mifos.test.acceptance.framework.holiday.CreateHolidayEntryPage.CreateHolidaySubmitParameters in project head by mifos.

the class HolidayTest method definedAndViewHoliday.

//http://mifosforge.jira.com/browse/MIFOSTEST-72
@Test(enabled = true)
public void definedAndViewHoliday() throws Exception {
    //Given
    dateTimeUpdaterRemoteTestingService.setDateTime(new DateTime(2037, 1, 1, 13, 0, 0, 0));
    //When / Then
    CreateHolidaySubmitParameters params = getHolidayParameters("2037");
    params.setRepaymentRule(CreateHolidaySubmitParameters.SAME_DAY);
    holidayTestHelper.createHoliday(params);
}
Also used : CreateHolidaySubmitParameters(org.mifos.test.acceptance.framework.holiday.CreateHolidayEntryPage.CreateHolidaySubmitParameters) DateTime(org.joda.time.DateTime) Test(org.testng.annotations.Test)

Example 12 with CreateHolidaySubmitParameters

use of org.mifos.test.acceptance.framework.holiday.CreateHolidayEntryPage.CreateHolidaySubmitParameters in project head by mifos.

the class HolidayTest method holidaysRepaymentRuleNextWorkingDayWithBatchJobs.

//http://mifosforge.jira.com/browse/MIFOSTEST-76
@Test(enabled = true)
public void holidaysRepaymentRuleNextWorkingDayWithBatchJobs() throws Exception {
    //Given
    dateTimeUpdaterRemoteTestingService.setDateTime(new DateTime(2036, 1, 1, 13, 0, 0, 0));
    //When
    CreateLoanAccountSearchParameters searchParameters = setSearchParameters();
    CreateLoanAccountSubmitParameters submitAccountParameters = setSubmitParameters();
    LoanAccountPage page = loanTestHelper.createLoanAccount(searchParameters, submitAccountParameters);
    String lid = page.getAccountId();
    page.navigateToRepaymentSchedulePage();
    loanTestHelper.verifyRepaymentScheduleForHolidays("11-Jan-2036", "18-Jan-2036", "25-Jan-2036", "01-Feb-2036", "08-Feb-2036", "15-Feb-2036", "22-Feb-2036", "29-Feb-2036", "07-Mar-2036", "14-Mar-2036");
    CreateHolidaySubmitParameters param = getHolidayParameters("2036");
    param.setRepaymentRule(CreateHolidaySubmitParameters.NEXT_WORKING_DAY);
    createHolidayForInstallments(param);
    //Then
    runBatchJobsForHoliday();
    navigationHelper.navigateToLoanAccountPage(lid).navigateToRepaymentSchedulePage();
    loanTestHelper.verifyRepaymentScheduleForHolidays("11-Jan-2036", "18-Jan-2036", "25-Jan-2036", "01-Feb-2036", "08-Feb-2036", "29-Feb-2036", "29-Feb-2036", "29-Feb-2036", "07-Mar-2036", "14-Mar-2036");
}
Also used : CreateLoanAccountSearchParameters(org.mifos.test.acceptance.framework.loan.CreateLoanAccountSearchParameters) CreateLoanAccountSubmitParameters(org.mifos.test.acceptance.framework.loan.CreateLoanAccountSubmitParameters) LoanAccountPage(org.mifos.test.acceptance.framework.loan.LoanAccountPage) CreateHolidaySubmitParameters(org.mifos.test.acceptance.framework.holiday.CreateHolidayEntryPage.CreateHolidaySubmitParameters) DateTime(org.joda.time.DateTime) Test(org.testng.annotations.Test)

Aggregations

CreateHolidaySubmitParameters (org.mifos.test.acceptance.framework.holiday.CreateHolidayEntryPage.CreateHolidaySubmitParameters)12 DateTime (org.joda.time.DateTime)9 Test (org.testng.annotations.Test)6 CreateLoanAccountSearchParameters (org.mifos.test.acceptance.framework.loan.CreateLoanAccountSearchParameters)4 CreateLoanAccountSubmitParameters (org.mifos.test.acceptance.framework.loan.CreateLoanAccountSubmitParameters)4 LoanAccountPage (org.mifos.test.acceptance.framework.loan.LoanAccountPage)2 ArrayList (java.util.ArrayList)1 AdminPage (org.mifos.test.acceptance.framework.admin.AdminPage)1 CreateHolidayConfirmationPage (org.mifos.test.acceptance.framework.holiday.CreateHolidayConfirmationPage)1 CreateHolidayEntryPage (org.mifos.test.acceptance.framework.holiday.CreateHolidayEntryPage)1 ChargeParameters (org.mifos.test.acceptance.framework.loan.ChargeParameters)1 DisburseLoanParameters (org.mifos.test.acceptance.framework.loan.DisburseLoanParameters)1 BatchJobHelper (org.mifos.test.acceptance.framework.testhelpers.BatchJobHelper)1