use of org.mifos.test.acceptance.remote.DateTimeUpdaterRemoteTestingService in project head by mifos.
the class CollectionSheetEntryTest method logOut.
@AfterMethod
public void logOut() {
(new MifosPage(selenium)).logout();
new DateTimeUpdaterRemoteTestingService(selenium).resetDateTime();
}
use of org.mifos.test.acceptance.remote.DateTimeUpdaterRemoteTestingService in project head by mifos.
the class ClientLoanTransactionHistoryTest 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);
systemDateTime = new DateTime(2011, 3, 4, 12, 0, 0, 0);
dateTimeUpdaterRemoteTestingService.setDateTime(systemDateTime);
loanTestHelper = new LoanTestHelper(selenium);
}
use of org.mifos.test.acceptance.remote.DateTimeUpdaterRemoteTestingService in project head by mifos.
the class CreateClientLoanAccountTest method createLoanAccountsWithRestrictedProductsMix.
/**
* Verify a user is prevented to create loan accounts of loan products restricted by the mix.
* http://mifosforge.jira.com/browse/MIFOSTEST-94
*
* @throws Exception
*/
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
@Test(enabled = true)
public void createLoanAccountsWithRestrictedProductsMix() throws Exception {
DateTimeUpdaterRemoteTestingService dateTimeUpdaterRemoteTestingService = new DateTimeUpdaterRemoteTestingService(selenium);
DateTime targetTime = new DateTime(2011, 1, 24, 15, 0, 0, 0);
dateTimeUpdaterRemoteTestingService.setDateTime(targetTime);
DefineNewLoanProductPage.SubmitFormParameters productParams = FormParametersHelper.getWeeklyLoanProductParameters();
productParams.setOfferingName("product94");
productParams.setOfferingShortName("p94");
productParams.setDefaultInterestRate("15.3");
productParams.setMaxInterestRate("50");
productParams.setInterestTypes(SubmitFormParameters.DECLINING_BALANCE);
productParams.setDefaultLoanAmount("13333");
productParams.setDefInstallments("13");
productParams.setApplicableFor(DefineNewLoanProductPage.SubmitFormParameters.GROUPS);
loanProductTestHelper.defineNewLoanProduct(productParams);
productParams.setOfferingName("product94B");
productParams.setOfferingShortName("p94b");
loanProductTestHelper.defineNewLoanProduct(productParams);
CreateLoanAccountSearchParameters searchParams1 = new CreateLoanAccountSearchParameters();
searchParams1.setSearchString("GroupWeekly");
searchParams1.setLoanProduct("product94");
CreateLoanAccountSearchParameters searchParams2 = new CreateLoanAccountSearchParameters();
searchParams2.setSearchString("GroupWeekly");
searchParams2.setLoanProduct("product94B");
DisburseLoanParameters disburseParams = new DisburseLoanParameters();
disburseParams.setPaymentType(DisburseLoanParameters.CASH);
disburseParams.setDisbursalDateDD("24");
disburseParams.setDisbursalDateMM("01");
disburseParams.setDisbursalDateYYYY("2011");
String error = "The loan could not be disbursed as " + searchParams1.getLoanProduct() + " and " + searchParams2.getLoanProduct() + " are not allowed to co-exist";
LoanAccountPage loanAccountPage = loanTestHelper.createTwoLoanAccountsWithMixedRestricedPoducts(searchParams1, searchParams2, disburseParams, new DateTime(2011, 02, 28, 10, 0, 0, 0));
loanAccountPage.verifyError(error);
}
use of org.mifos.test.acceptance.remote.DateTimeUpdaterRemoteTestingService in project head by mifos.
the class CreateClientLoanAccountTest method newMonthlyClientLoanAccountWithMeetingOnSpecificDayOfMonth.
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
//http://mifosforge.jira.com/browse/MIFOSTEST-308
@Test(enabled = true)
public void newMonthlyClientLoanAccountWithMeetingOnSpecificDayOfMonth() throws Exception {
//Given
DateTimeUpdaterRemoteTestingService dateTimeUpdaterRemoteTestingService = new DateTimeUpdaterRemoteTestingService(selenium);
DateTime targetTime = new DateTime(2011, 2, 1, 13, 0, 0, 0);
dateTimeUpdaterRemoteTestingService.setDateTime(targetTime);
CreateLoanAccountSearchParameters searchParameters = new CreateLoanAccountSearchParameters();
searchParameters.setSearchString("Client - Mary Monthly");
searchParameters.setLoanProduct("MonthlyClientFlatLoan1stOfMonth");
CreateLoanAccountSubmitParameters submitAccountParameters = new CreateLoanAccountSubmitParameters();
submitAccountParameters.setAmount("1234.0");
submitAccountParameters.setGracePeriodTypeNone(true);
//Then
String loanId = createLoanAndCheckAmount(searchParameters, submitAccountParameters, null);
getLoanStatusActive(loanId);
}
use of org.mifos.test.acceptance.remote.DateTimeUpdaterRemoteTestingService in project head by mifos.
the class CreateClientLoanAccountTest method newLoanAccountWithThousandSeparator.
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
@Test(enabled = true)
public void newLoanAccountWithThousandSeparator() throws Exception {
//Given
DateTimeUpdaterRemoteTestingService dateTimeUpdaterRemoteTestingService = new DateTimeUpdaterRemoteTestingService(selenium);
DateTime targetTime = new DateTime(2011, 2, 1, 13, 0, 0, 0);
dateTimeUpdaterRemoteTestingService.setDateTime(targetTime);
CreateLoanAccountSearchParameters searchParameters = new CreateLoanAccountSearchParameters();
searchParameters.setSearchString("Client - Mary Monthly");
searchParameters.setLoanProduct("MonthlyClientFlatLoan1stOfMonth");
CreateLoanAccountSubmitParameters submitAccountParameters = new CreateLoanAccountSubmitParameters();
submitAccountParameters.setAmount("1,234.0");
submitAccountParameters.setGracePeriodTypeNone(true);
//Then
createLoanAndCheckAmount(searchParameters, submitAccountParameters, null);
}
Aggregations