use of org.mifos.application.meeting.business.MeetingBO in project head by mifos.
the class FinancialBusinessServiceIntegrationTest method getLoanAccount.
private LoanBO 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(this.getClass().getSimpleName() + "", "FL", 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 AccountBOIntegrationTest method testGetInstalmentDates.
@Test
public void testGetInstalmentDates() throws Exception {
AccountBO account = new AccountBO();
MeetingBO meeting = new MeetingBO(RecurrenceType.DAILY, (short) 1, getDate("18/08/2005"), MeetingType.CUSTOMER_MEETING);
/*
* make sure we can handle case where the number of installments is zero
*/
account.getInstallmentDates(meeting, (short) 0, (short) 0);
}
use of org.mifos.application.meeting.business.MeetingBO in project head by mifos.
the class FeeBOIntegrationTest method testCreatePeriodicRateFee.
@Test
public void testCreatePeriodicRateFee() throws Exception {
MeetingBO feefrequency = new MeetingBO(RecurrenceType.WEEKLY, Short.valueOf("2"), new Date(), MeetingType.PERIODIC_FEE);
fee = createPeriodicRateFee("Customer_Periodic_RateFee", FeeCategory.CENTER, 100.0, FeeFormula.AMOUNT, false, feefrequency);
fee.save();
StaticHibernateUtil.flushSession();
fee = (FeeBO) TestObjectFactory.getObject(FeeBO.class, fee.getFeeId());
Assert.assertEquals("Customer_Periodic_RateFee", fee.getFeeName());
Assert.assertEquals(FeeCategory.CENTER.getValue(), fee.getCategoryType().getId());
}
use of org.mifos.application.meeting.business.MeetingBO in project head by mifos.
the class FeeBOIntegrationTest method testCreatePeriodicDefaultFee.
@Test
public void testCreatePeriodicDefaultFee() throws Exception {
MeetingBO feefrequency = new MeetingBO(RecurrenceType.WEEKLY, Short.valueOf("2"), new Date(), MeetingType.PERIODIC_FEE);
fee = createPeriodicRateFee("Customer_Periodic_DefaultFee", FeeCategory.ALLCUSTOMERS, 100.0, FeeFormula.AMOUNT, true, feefrequency);
fee.save();
StaticHibernateUtil.flushSession();
fee = (FeeBO) TestObjectFactory.getObject(FeeBO.class, fee.getFeeId());
Assert.assertEquals("Customer_Periodic_DefaultFee", fee.getFeeName());
Assert.assertEquals(FeeCategory.ALLCUSTOMERS.getValue(), fee.getCategoryType().getId());
Assert.assertEquals(true, fee.isCustomerDefaultFee());
Assert.assertTrue(vaidateDefaultCustomerFee(fee.getFeeLevels(), fee.getCategoryType().getFeeCategory()));
StaticHibernateUtil.flushSession();
}
use of org.mifos.application.meeting.business.MeetingBO in project head by mifos.
the class FeeBOIntegrationTest method testCreatePeriodicAmountFee.
@Test
public void testCreatePeriodicAmountFee() throws Exception {
MeetingBO feefrequency = new MeetingBO(RecurrenceType.WEEKLY, Short.valueOf("2"), new Date(), MeetingType.PERIODIC_FEE);
fee = createPeriodicAmountFee("Customer_Periodic_AmountFee", FeeCategory.CENTER, "100", false, feefrequency);
fee.save();
StaticHibernateUtil.flushSession();
fee = (FeeBO) TestObjectFactory.getObject(FeeBO.class, fee.getFeeId());
Assert.assertEquals("Customer_Periodic_AmountFee", fee.getFeeName());
Assert.assertEquals(FeeCategory.CENTER.getValue(), fee.getCategoryType().getId());
StaticHibernateUtil.flushSession();
}
Aggregations