Search in sources :

Example 91 with DateTimeUpdaterRemoteTestingService

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);
}
Also used : DateTimeUpdaterRemoteTestingService(org.mifos.test.acceptance.remote.DateTimeUpdaterRemoteTestingService) DateTime(org.joda.time.DateTime) LoanTestHelper(org.mifos.test.acceptance.framework.testhelpers.LoanTestHelper) BeforeMethod(org.testng.annotations.BeforeMethod)

Example 92 with DateTimeUpdaterRemoteTestingService

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);
}
Also used : DateTimeUpdaterRemoteTestingService(org.mifos.test.acceptance.remote.DateTimeUpdaterRemoteTestingService) DateTime(org.joda.time.DateTime)

Example 93 with DateTimeUpdaterRemoteTestingService

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);
}
Also used : DateTimeUpdaterRemoteTestingService(org.mifos.test.acceptance.remote.DateTimeUpdaterRemoteTestingService) DateTime(org.joda.time.DateTime) LoanTestHelper(org.mifos.test.acceptance.framework.testhelpers.LoanTestHelper) BeforeMethod(org.testng.annotations.BeforeMethod)

Example 94 with DateTimeUpdaterRemoteTestingService

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);
}
Also used : NavigationHelper(org.mifos.test.acceptance.framework.testhelpers.NavigationHelper) LoanAccountPage(org.mifos.test.acceptance.framework.loan.LoanAccountPage) DateTimeUpdaterRemoteTestingService(org.mifos.test.acceptance.remote.DateTimeUpdaterRemoteTestingService) PenaltyHelper(org.mifos.test.acceptance.framework.testhelpers.PenaltyHelper) ChargeParameters(org.mifos.test.acceptance.framework.loan.ChargeParameters) DateTime(org.joda.time.DateTime)

Example 95 with DateTimeUpdaterRemoteTestingService

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);
}
Also used : DateTimeUpdaterRemoteTestingService(org.mifos.test.acceptance.remote.DateTimeUpdaterRemoteTestingService) DateTime(org.joda.time.DateTime)

Aggregations

DateTimeUpdaterRemoteTestingService (org.mifos.test.acceptance.remote.DateTimeUpdaterRemoteTestingService)103 DateTime (org.joda.time.DateTime)81 BeforeMethod (org.testng.annotations.BeforeMethod)41 Test (org.testng.annotations.Test)22 LoanTestHelper (org.mifos.test.acceptance.framework.testhelpers.LoanTestHelper)21 NavigationHelper (org.mifos.test.acceptance.framework.testhelpers.NavigationHelper)20 CreateLoanAccountSearchParameters (org.mifos.test.acceptance.framework.loan.CreateLoanAccountSearchParameters)19 LoanAccountPage (org.mifos.test.acceptance.framework.loan.LoanAccountPage)16 DisburseLoanParameters (org.mifos.test.acceptance.framework.loan.DisburseLoanParameters)10 CreateLoanAccountSubmitParameters (org.mifos.test.acceptance.framework.loan.CreateLoanAccountSubmitParameters)9 SavingsAccountDetailPage (org.mifos.test.acceptance.framework.savings.SavingsAccountDetailPage)9 MifosPage (org.mifos.test.acceptance.framework.MifosPage)8 DepositWithdrawalSavingsParameters (org.mifos.test.acceptance.framework.savings.DepositWithdrawalSavingsParameters)8 SavingsProductParameters (org.mifos.test.acceptance.framework.savingsproduct.SavingsProductParameters)8 AfterMethod (org.testng.annotations.AfterMethod)8 CustomPropertiesHelper (org.mifos.test.acceptance.framework.testhelpers.CustomPropertiesHelper)7 EditAccountStatusParameters (org.mifos.test.acceptance.framework.account.EditAccountStatusParameters)6 SubmitFormParameters (org.mifos.test.acceptance.framework.loanproduct.DefineNewLoanProductPage.SubmitFormParameters)6 SavingsAccountHelper (org.mifos.test.acceptance.framework.testhelpers.SavingsAccountHelper)6 AppLauncher (org.mifos.test.acceptance.framework.AppLauncher)5