use of org.mifos.application.meeting.business.MeetingBO in project head by mifos.
the class LoanBusinessServiceIntegrationTest method getLoanAccount.
private AccountBO getLoanAccount() {
Date startDate = new Date(System.currentTimeMillis());
MeetingBO meeting = TestObjectFactory.createMeeting(TestObjectFactory.getTypicalMeeting());
center = TestObjectFactory.createWeeklyFeeCenter(this.getClass().getSimpleName() + "_Center", meeting);
group = TestObjectFactory.createWeeklyFeeGroupUnderCenter(this.getClass().getSimpleName() + "_Group", CustomerStatus.GROUP_ACTIVE, center);
LoanOfferingBO loanOffering = TestObjectFactory.createLoanOffering(startDate, meeting);
return TestObjectFactory.createLoanAccount("42423142341", group, AccountState.LOAN_ACTIVE_IN_GOOD_STANDING, startDate, loanOffering);
}
use of org.mifos.application.meeting.business.MeetingBO in project head by mifos.
the class LoanAccountActionStrutsTest method getLoanAccountFromLastLoanAmount.
private AccountBO getLoanAccountFromLastLoanAmount() {
Date startDate = new Date(System.currentTimeMillis());
MeetingBO meeting = TestObjectFactory.createMeeting(TestObjectFactory.getNewMeetingForToday(WEEKLY, EVERY_WEEK, CUSTOMER_MEETING));
LoanOfferingBO loanOffering = TestObjectFactory.createLoanOffering(startDate, meeting);
return TestObjectFactory.createLoanAccount("42423142341", group, AccountState.LOAN_ACTIVE_IN_GOOD_STANDING, startDate, loanOffering);
}
use of org.mifos.application.meeting.business.MeetingBO in project head by mifos.
the class AbstractLoanActionTestCase method getLoanOffering.
protected LoanOfferingBO getLoanOffering(String name, String shortName, ApplicableTo applicableTo, RecurrenceType meetingFrequency, short recurAfter) {
MeetingBO meeting = TestObjectFactory.createMeeting(TestObjectFactory.getNewMeeting(meetingFrequency, recurAfter, CUSTOMER_MEETING, MONDAY));
Date currentDate = new Date(System.currentTimeMillis());
return TestObjectFactory.createLoanOffering(name, shortName, applicableTo, currentDate, PrdStatus.LOAN_ACTIVE, 300.0, 1.2, 3, InterestType.FLAT, meeting);
}
use of org.mifos.application.meeting.business.MeetingBO in project head by mifos.
the class AbstractLoanActionTestCase method getLoanOffering.
protected LoanOfferingBO getLoanOffering(String name, String shortName, ApplicableTo applicableTo, RecurrenceType meetingFrequency, short recurAfter, VariableInstallmentDetailsBO variableInstallmentDetailsBO) {
MeetingBO meeting = TestObjectFactory.createMeeting(TestObjectFactory.getNewMeeting(meetingFrequency, recurAfter, CUSTOMER_MEETING, MONDAY));
Date currentDate = new Date(System.currentTimeMillis());
return TestObjectFactory.createLoanOffering(name, shortName, applicableTo, currentDate, PrdStatus.LOAN_ACTIVE, 300.0, 1.2, 3, InterestType.FLAT, meeting, variableInstallmentDetailsBO);
}
use of org.mifos.application.meeting.business.MeetingBO in project head by mifos.
the class SavingsBOIntegrationTest method testMaxWithdrawAmount.
@Test
public void testMaxWithdrawAmount() throws AccountException, Exception {
MeetingBO meeting = TestObjectFactory.createMeeting(TestObjectFactory.getNewMeetingForToday(WEEKLY, EVERY_WEEK, CUSTOMER_MEETING));
center = TestObjectFactory.createWeeklyFeeCenter("Center", meeting);
group = TestObjectFactory.createWeeklyFeeGroupUnderCenter("Group", CustomerStatus.GROUP_ACTIVE, center);
client1 = TestObjectFactory.createClient("Client", CustomerStatus.CLIENT_ACTIVE, group);
savingsOffering = helper.createSavingsOffering("dfasdasd1", "sad1");
savings = TestObjectFactory.createSavingsAccount("43245434", client1, Short.valueOf("16"), new Date(System.currentTimeMillis()), savingsOffering);
savings = (SavingsBO) legacyAccountDao.getAccount(savings.getAccountId());
savings.setSavingsBalance(TestUtils.createMoney("100.0"));
Money enteredAmount = new Money(currency, "300.0");
PaymentData paymentData = PaymentData.createPaymentData(enteredAmount, savings.getPersonnel(), Short.valueOf("1"), new Date(System.currentTimeMillis()));
paymentData.setCustomer(client1);
paymentData.setReceiptDate(new Date(System.currentTimeMillis()));
paymentData.setReceiptNum("34244");
try {
boolean persist = true;
savings.withdraw(paymentData, persist);
Assert.assertTrue("No Exception is thrown. Even amount greater than max withdrawal allowed to be withdrawn", false);
} catch (AccountException ae) {
Assert.assertTrue("Exception is thrown. Amount greater than max withdrawal not allowed to be withdrawn", true);
}
savings.getAccountPayments().clear();
}
Aggregations