use of org.mifos.test.acceptance.remote.DateTimeUpdaterRemoteTestingService in project head by mifos.
the class LoanAccountPerformanceHistoryTest method setUp.
@Override
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
// one of the dependent methods throws Exception
@BeforeMethod
public void setUp() throws Exception {
super.setUp();
//appLauncher = new AppLauncher(selenium);
DateTimeUpdaterRemoteTestingService dateTimeUpdaterRemoteTestingService = new DateTimeUpdaterRemoteTestingService(selenium);
DateTime targetTime = new DateTime(2011, 03, 04, 1, 0, 0, 0);
dateTimeUpdaterRemoteTestingService.setDateTime(targetTime);
loanTestHelper = new LoanTestHelper(selenium);
}
use of org.mifos.test.acceptance.remote.DateTimeUpdaterRemoteTestingService in project head by mifos.
the class LoanRepayTest method setupTime.
private void setupTime() throws DatabaseUnitException, SQLException, IOException, URISyntaxException {
DateTimeUpdaterRemoteTestingService dateTimeUpdaterRemoteTestingService = new DateTimeUpdaterRemoteTestingService(selenium);
DateTime targetTime = new DateTime(2011, 3, 13, 13, 0, 0, 0);
dateTimeUpdaterRemoteTestingService.setDateTime(targetTime);
}
use of org.mifos.test.acceptance.remote.DateTimeUpdaterRemoteTestingService in project head by mifos.
the class PenaltyTest method setUp.
@Override
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
// one of the dependent methods throws Exception
@BeforeMethod
public void setUp() throws Exception {
super.setUp();
DateTimeUpdaterRemoteTestingService dateTimeUpdaterRemoteTestingService = new DateTimeUpdaterRemoteTestingService(selenium);
DateTime targetTime = new DateTime(2011, 2, 28, 14, 0, 0, 0);
dateTimeUpdaterRemoteTestingService.setDateTime(targetTime);
loanTestHelper = new LoanTestHelper(selenium);
}
use of org.mifos.test.acceptance.remote.DateTimeUpdaterRemoteTestingService in project head by mifos.
the class PenaltyTest method canRemoveAutomaticPenaltyAfterPaymentHasBeenMade.
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
public void canRemoveAutomaticPenaltyAfterPaymentHasBeenMade() throws Exception {
LoanAccountPage loanAccountPage = prepareLoanForPenaltyTest();
String accountId = loanAccountPage.getAccountId();
PenaltyHelper penaltyHelper = new PenaltyHelper(selenium);
String penaltyName = "Penalty_" + StringUtil.getRandomString(6);
penaltyHelper.createRatePenalty(penaltyName, PenaltyFormParameters.PERIOD_NONE, "", PenaltyFormParameters.FREQUENCY_MONTHLY, "33.3", PenaltyFormParameters.FORMULA_OVERDUE_AMOUNT, "0", "9999999");
ChargeParameters chargeParams = new ChargeParameters();
chargeParams.setType(penaltyName);
chargeParams.setAmount("");
NavigationHelper navigationHelper = new NavigationHelper(selenium);
loanAccountPage = navigationHelper.navigateToLoanAccountPage(accountId);
loanTestHelper.applyChargeUsingFeeLabel(accountId, chargeParams);
new DateTimeUpdaterRemoteTestingService(selenium).setDateTime(new DateTime().plusYears(1));
loanAccountPage = navigationHelper.navigateToLoanAccountPage(accountId);
loanAccountPage = loanAccountPage.removePenalty(1);
loanAccountPage.verifyNoPenaltyRemovalLinkExists(1);
}
use of org.mifos.test.acceptance.remote.DateTimeUpdaterRemoteTestingService in project head by mifos.
the class PenaltyTest method prepareLoanForPenaltyTest.
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
private LoanAccountPage prepareLoanForPenaltyTest() throws Exception {
String client = "WeeklyClient Monday";
DateTime currentTime = new DateTime().withYear(2012).withDayOfMonth(3).withMonthOfYear(12);
new DateTimeUpdaterRemoteTestingService(selenium).setDateTime(currentTime);
String dd = Integer.toString(currentTime.getDayOfMonth());
String mm = Integer.toString(currentTime.getMonthOfYear());
String yy = Integer.toString(currentTime.getYear());
applicationDatabaseOperation.updateLSIM(1);
return loanTestHelper.createActivateDisburstAndApplyPaymentForDefaultLoanAccount(client, dd, mm, yy);
}
Aggregations