use of org.mifos.test.acceptance.remote.DateTimeUpdaterRemoteTestingService in project head by mifos.
the class AdditionalSavingsAccountTest method setUp.
@Override
// one of the dependent methods throws Exception
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
@BeforeMethod(alwaysRun = true)
public void setUp() throws Exception {
super.setUp();
DateTimeUpdaterRemoteTestingService dateTimeUpdaterRemoteTestingService = new DateTimeUpdaterRemoteTestingService(selenium);
dateTimeUpdaterRemoteTestingService.resetDateTime();
savingsProductHelper = new SavingsProductHelper(selenium);
savingsAccountHelper = new SavingsAccountHelper(selenium);
navigationHelper = new NavigationHelper(selenium);
}
use of org.mifos.test.acceptance.remote.DateTimeUpdaterRemoteTestingService in project head by mifos.
the class AdditionalSavingsAccountTest method savingsAdjustmentsForDepositsWithdrawals.
//http://mifosforge.jira.com/browse/MIFOSTEST-144
// one of the dependent methods throws Exception
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
public void savingsAdjustmentsForDepositsWithdrawals() throws Exception {
//Given
DateTimeUpdaterRemoteTestingService dateTimeUpdaterRemoteTestingService = new DateTimeUpdaterRemoteTestingService(selenium);
DateTime targetTime = new DateTime(2011, 1, 1, 13, 0, 0, 0);
dateTimeUpdaterRemoteTestingService.setDateTime(targetTime);
initRemote.dataLoadAndCacheRefresh(dbUnitUtilities, "acceptance_small_008_dbunit.xml", dataSource, selenium);
//When
SavingsProductParameters params = getVoluntaryGroupsMonthCalculactionProductParameters(targetTime);
params.setApplicableFor(SavingsProductParameters.CLIENTS);
params.setInterestRate("10");
String savingsId = createSavingsAccount(params);
DepositWithdrawalSavingsParameters depositParams = new DepositWithdrawalSavingsParameters();
depositParams = makeDefaultDepositWithdrawal(targetTime, depositParams, savingsId, DepositWithdrawalSavingsParameters.DEPOSIT, "500");
targetTime = new DateTime(2011, 2, 1, 13, 0, 0, 0);
dateTimeUpdaterRemoteTestingService.setDateTime(targetTime);
depositParams = makeDefaultDepositWithdrawal(targetTime, depositParams, savingsId, DepositWithdrawalSavingsParameters.WITHDRAWAL, "200");
targetTime = new DateTime(2011, 3, 1, 13, 0, 0, 0);
dateTimeUpdaterRemoteTestingService.setDateTime(targetTime);
navigationHelper.navigateToAdminPage();
runBatchJobsForSavingsIntPosting();
navigationHelper.navigateToSavingsAccountDetailPage(savingsId);
Assert.assertEquals(selenium.getTable("recentActivityForDetailPage.1.2"), "4.1");
targetTime = new DateTime(2011, 4, 1, 13, 0, 0, 0);
dateTimeUpdaterRemoteTestingService.setDateTime(targetTime);
navigationHelper.navigateToAdminPage();
runBatchJobsForSavingsIntPosting();
navigationHelper.navigateToSavingsAccountDetailPage(savingsId);
Assert.assertEquals(selenium.getTable("recentActivityForDetailPage.1.2"), "2.6");
SavingsAccountDetailPage savingsAccountDetailPage = new SavingsAccountDetailPage(selenium);
SavingsApplyAdjustmentPage savingsApplyAdjustmentPage = new SavingsApplyAdjustmentPage(selenium);
depositParams = makeDefaultDepositWithdrawal(targetTime, depositParams, savingsId, DepositWithdrawalSavingsParameters.DEPOSIT, "123");
savingsAccountDetailPage = navigationHelper.navigateToSavingsAccountDetailPage(savingsId);
savingsApplyAdjustmentPage = savingsAccountDetailPage.navigateToApplyAdjustmentPage();
savingsApplyAdjustmentPage.applyAdjustment("234", "adjustment");
targetTime = new DateTime(2011, 5, 1, 13, 0, 0, 0);
dateTimeUpdaterRemoteTestingService.setDateTime(targetTime);
navigationHelper.navigateToAdminPage();
runBatchJobsForSavingsIntPosting();
navigationHelper.navigateToSavingsAccountDetailPage(savingsId);
Assert.assertEquals(selenium.getTable("recentActivityForDetailPage.1.2"), "4.4");
depositParams = makeDefaultDepositWithdrawal(targetTime, depositParams, savingsId, DepositWithdrawalSavingsParameters.WITHDRAWAL, "45");
savingsAccountDetailPage = navigationHelper.navigateToSavingsAccountDetailPage(savingsId);
savingsApplyAdjustmentPage = savingsAccountDetailPage.navigateToApplyAdjustmentPage();
savingsApplyAdjustmentPage.applyAdjustment("55", "adjustment");
targetTime = new DateTime(2011, 6, 1, 13, 0, 0, 0);
dateTimeUpdaterRemoteTestingService.setDateTime(targetTime);
navigationHelper.navigateToAdminPage();
runBatchJobsForSavingsIntPosting();
navigationHelper.navigateToSavingsAccountDetailPage(savingsId);
Assert.assertEquals(selenium.getTable("recentActivityForDetailPage.1.2"), "4.2");
depositParams = makeDefaultDepositWithdrawal(targetTime, depositParams, savingsId, DepositWithdrawalSavingsParameters.DEPOSIT, "555");
savingsAccountDetailPage = navigationHelper.navigateToSavingsAccountDetailPage(savingsId);
savingsApplyAdjustmentPage = savingsAccountDetailPage.navigateToApplyAdjustmentPage();
savingsApplyAdjustmentPage.applyAdjustment("444", "adjustment");
targetTime = new DateTime(2011, 7, 1, 13, 0, 0, 0);
dateTimeUpdaterRemoteTestingService.setDateTime(targetTime);
navigationHelper.navigateToAdminPage();
runBatchJobsForSavingsIntPosting();
navigationHelper.navigateToSavingsAccountDetailPage(savingsId);
Assert.assertEquals(selenium.getTable("recentActivityForDetailPage.1.2"), "7.6");
//step 12-15
params = getVoluntaryGroupsMonthCalculactionProductParameters(targetTime);
params.setApplicableFor(SavingsProductParameters.CLIENTS);
String savingsId2 = createSavingsAccount(params);
depositParams = makeDefaultDepositWithdrawal(targetTime, depositParams, savingsId2, DepositWithdrawalSavingsParameters.DEPOSIT, "555");
depositParams = makeDefaultDepositWithdrawal(targetTime, depositParams, savingsId2, DepositWithdrawalSavingsParameters.WITHDRAWAL, "222");
// month with last day is a non-working day
targetTime = new DateTime(2011, 8, 1, 13, 0, 0, 0);
dateTimeUpdaterRemoteTestingService.setDateTime(targetTime);
navigationHelper.navigateToAdminPage();
runBatchJobsForSavingsIntPosting();
navigationHelper.navigateToSavingsAccountDetailPage(savingsId2);
Assert.assertEquals(selenium.getTable("recentActivityForDetailPage.1.2"), "1.4");
}
use of org.mifos.test.acceptance.remote.DateTimeUpdaterRemoteTestingService in project head by mifos.
the class TaskListTest method setUp.
@Override
// one of the dependent methods throws Exception
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
@BeforeMethod
public void setUp() throws Exception {
super.setUp();
navigationHelper = new NavigationHelper(selenium);
dateTimeUpdaterRemoteTestingService = new DateTimeUpdaterRemoteTestingService(selenium);
}
use of org.mifos.test.acceptance.remote.DateTimeUpdaterRemoteTestingService in project head by mifos.
the class PPITest method setUp.
@Override
@BeforeMethod(alwaysRun = true)
public void setUp() throws Exception {
super.setUp();
questionGroupTestHelper = new QuestionGroupTestHelper(selenium);
clientTestHelper = new ClientTestHelper(selenium);
DateTimeUpdaterRemoteTestingService dateTimeUpdaterRemoteTestingService = new DateTimeUpdaterRemoteTestingService(selenium);
DateTime targetTime = new DateTime(2009, 11, 7, 10, 0, 0, 0);
dateTimeUpdaterRemoteTestingService.setDateTime(targetTime);
}
use of org.mifos.test.acceptance.remote.DateTimeUpdaterRemoteTestingService in project head by mifos.
the class K2IntegrationTest method setUp.
@Override
@BeforeClass
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
public void setUp() throws Exception {
super.setUp();
// Given
DateTimeUpdaterRemoteTestingService dateTimeUpdaterRemoteTestingService = new DateTimeUpdaterRemoteTestingService(selenium);
DateTime targetTime = new DateTime(2011, 9, 13, 13, 0, 0, 0);
dateTimeUpdaterRemoteTestingService.setDateTime(targetTime);
initRemote.dataLoadAndCacheRefresh(dbUnitUtilities, "REST_API_20110912_dbunit.xml", dataSource, selenium);
helper = new K2IntegrationTestHelper(selenium);
helper.navigateToJsonAjaxPage();
}
Aggregations