use of org.mifos.test.acceptance.framework.holiday.CreateHolidayEntryPage.CreateHolidaySubmitParameters in project head by mifos.
the class AdditionalHolidayTest method testBranchSpecificMoratorium.
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
public //http://mifosforge.jira.com/browse/MIFOSTEST-280
void testBranchSpecificMoratorium() throws Exception {
DateTime targetTime = new DateTime(2009, 3, 11, 0, 0, 0, 0);
dateTimeUpdaterRemoteTestingService.setDateTime(targetTime);
//Given
CreateHolidaySubmitParameters param = getCreateHolidaySubmitParameters();
//When / Then
holidayTestHelper.createHoliday(param);
}
use of org.mifos.test.acceptance.framework.holiday.CreateHolidayEntryPage.CreateHolidaySubmitParameters in project head by mifos.
the class HolidayTest method getHolidayParameters.
private CreateHolidaySubmitParameters getHolidayParameters(String year) {
CreateHolidaySubmitParameters params = new CreateHolidayEntryPage.CreateHolidaySubmitParameters();
params.setName("Holiday Test" + StringUtil.getRandomString(2));
params.setFromDateDD("14");
params.setFromDateMM("02");
params.setFromDateYYYY(year);
params.setThruDateDD("28");
params.setThruDateMM("02");
params.setThruDateYYYY(year);
params.setRepaymentRule(CreateHolidaySubmitParameters.NEXT_MEETING_OR_REPAYMENT);
params.setSelectedOfficeIds("1");
params.addOffice("Mifos HO");
return params;
}
use of org.mifos.test.acceptance.framework.holiday.CreateHolidayEntryPage.CreateHolidaySubmitParameters in project head by mifos.
the class HolidayTest method holidaysRepaymentRuleNextWorkingDay.
//http://mifosforge.jira.com/browse/MIFOSTEST-81
@Test(enabled = true)
public void holidaysRepaymentRuleNextWorkingDay() throws Exception {
//Given
dateTimeUpdaterRemoteTestingService.setDateTime(new DateTime(2033, 1, 1, 13, 0, 0, 0));
//When
CreateHolidaySubmitParameters param = getHolidayParameters("2033");
param.setRepaymentRule(CreateHolidaySubmitParameters.NEXT_WORKING_DAY);
createHolidayForInstallments(param);
CreateLoanAccountSearchParameters searchParameters = setSearchParameters();
CreateLoanAccountSubmitParameters submitAccountParameters = setSubmitParameters();
//Then
loanTestHelper.createLoanAccount(searchParameters, submitAccountParameters).navigateToRepaymentSchedulePage();
loanTestHelper.verifyRepaymentScheduleForHolidays("14-Jan-2033", "21-Jan-2033", "28-Jan-2033", "04-Feb-2033", "11-Feb-2033", "01-Mar-2033", "01-Mar-2033", "04-Mar-2033", "11-Mar-2033", "18-Mar-2033");
}
use of org.mifos.test.acceptance.framework.holiday.CreateHolidayEntryPage.CreateHolidaySubmitParameters in project head by mifos.
the class HolidayTest method holidaysRepaymentRuleSameDay.
//http://mifosforge.jira.com/browse/MIFOSTEST-78
@Test(enabled = true)
public void holidaysRepaymentRuleSameDay() throws Exception {
//Given
dateTimeUpdaterRemoteTestingService.setDateTime(new DateTime(2032, 1, 1, 13, 0, 0, 0));
//When
CreateHolidaySubmitParameters param = getHolidayParameters("2032");
param.setRepaymentRule(CreateHolidaySubmitParameters.SAME_DAY);
createHolidayForInstallments(param);
CreateLoanAccountSearchParameters searchParameters = setSearchParameters();
CreateLoanAccountSubmitParameters submitAccountParameters = setSubmitParameters();
//Then
loanTestHelper.createLoanAccount(searchParameters, submitAccountParameters).navigateToRepaymentSchedulePage();
loanTestHelper.verifyRepaymentScheduleForHolidays("09-Jan-2032", "16-Jan-2032", "23-Jan-2032", "30-Jan-2032", "06-Feb-2032", "13-Feb-2032", "20-Feb-2032", "27-Feb-2032", "05-Mar-2032", "12-Mar-2032");
}
use of org.mifos.test.acceptance.framework.holiday.CreateHolidayEntryPage.CreateHolidaySubmitParameters in project head by mifos.
the class HolidayTest method createHoliday.
// one of the dependent methods throws Exception
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
@Test(enabled = true)
public void createHoliday() throws Exception {
//Given
dateTimeUpdaterRemoteTestingService.setDateTime(new DateTime(2010, 1, 1, 13, 0, 0, 0));
AdminPage adminPage = loginAndNavigateToAdminPage();
adminPage.verifyPage();
CreateHolidayEntryPage createHolidayEntryPage = adminPage.navigateToDefineHolidayPage();
CreateHolidaySubmitParameters params = this.getHolidayParameters();
CreateHolidayConfirmationPage confirmationPage = createHolidayEntryPage.submitAndNavigateToHolidayConfirmationPage(params);
confirmationPage.submitAndNavigateToViewHolidaysPage();
// try to create second holiday with the same date
createHolidayEntryPage = adminPage.navigateToDefineHolidayPage();
params.setName("Test Holiday 2");
confirmationPage = createHolidayEntryPage.submitAndNavigateToHolidayConfirmationPage(params);
assertTextFoundOnPage("Holiday with the same date already exists:", "Text about duplicated holidays was not found.");
}
Aggregations