use of org.mifos.domain.builders.MeetingBuilder in project head by mifos.
the class FeeInstallmentTest method createWeeklyFeeBO.
private FeeBO createWeeklyFeeBO(int every) {
MeetingBO feeMeeting = new MeetingBuilder().every(every).weekly().build();
FeeBO feeBO = new AmountFeeBO(new Money(TestUtils.RUPEE, "10.0"), "Fee", FeeCategory.ALLCUSTOMERS, FeeFrequencyType.PERIODIC, new GLCodeEntity(Short.valueOf("1"), "10000"), feeMeeting, null, new DateTime().minusDays(14).toDate(), TestUtils.makeUserWithLocales().getId());
return feeBO;
}
use of org.mifos.domain.builders.MeetingBuilder in project head by mifos.
the class SavingsDaoHibernateIntegrationTest method setUp.
@Before
public void setUp() throws Exception {
enableCustomWorkingDays();
weeklyMeeting = new MeetingBuilder().customerMeeting().weekly().every(1).startingToday().build();
IntegrationTestObjectMother.saveMeeting(weeklyMeeting);
weeklyPeriodicFeeForCenterOnly = new FeeBuilder().appliesToCenterOnly().withFeeAmount("100.0").withName("Center Weekly Periodic Fee").withSameRecurrenceAs(weeklyMeeting).with(sampleBranchOffice()).build();
IntegrationTestObjectMother.saveFee(weeklyPeriodicFeeForCenterOnly);
center = new CenterBuilder().with(weeklyMeeting).withName("Center").with(sampleBranchOffice()).withLoanOfficer(testUser()).build();
IntegrationTestObjectMother.createCenter((CenterBO) center, weeklyMeeting);
weeklyPeriodicFeeForGroupOnly = new FeeBuilder().appliesToGroupsOnly().withFeeAmount("50.0").withName("Group Weekly Periodic Fee").withSameRecurrenceAs(weeklyMeeting).with(sampleBranchOffice()).build();
IntegrationTestObjectMother.saveFee(weeklyPeriodicFeeForGroupOnly);
group = new GroupBuilder().withMeeting(weeklyMeeting).withName("Group").withOffice(sampleBranchOffice()).withLoanOfficer(testUser()).withFee(weeklyPeriodicFeeForGroupOnly).withParentCustomer(center).build();
IntegrationTestObjectMother.createGroup(group, weeklyMeeting);
weeklyPeriodicFeeForClientsOnly = new FeeBuilder().appliesToClientsOnly().withFeeAmount("10.0").withName("Client Weekly Periodic Fee").withSameRecurrenceAs(weeklyMeeting).with(sampleBranchOffice()).build();
IntegrationTestObjectMother.saveFee(weeklyPeriodicFeeForClientsOnly);
client = new ClientBuilder().withMeeting(weeklyMeeting).withName("Client 1").withOffice(sampleBranchOffice()).withLoanOfficer(testUser()).withParentCustomer(group).buildForIntegrationTests();
IntegrationTestObjectMother.createClient(client, weeklyMeeting);
customerHierarchyParams = new CustomerHierarchyParams(center.getCustomerId(), center.getOffice().getOfficeId(), center.getSearchId() + ".%", new LocalDate());
baseDao = new GenericDaoHibernate();
savingsDao = new SavingsDaoHibernate(baseDao);
}
use of org.mifos.domain.builders.MeetingBuilder in project head by mifos.
the class SavingsPostInterestTest method setupForEachTest.
@Before
public void setupForEachTest() {
client = new ClientBuilder().active().buildForUnitTests();
MeetingBO interestPostingMeeting = new MeetingBuilder().savingsInterestPostingSchedule().monthly().every(1).build();
savingsProduct = new SavingsProductBuilder().mandatory().withMandatoryAmount("33.0").appliesToClientsOnly().withInterestPostingSchedule(interestPostingMeeting).buildForUnitTests();
}
use of org.mifos.domain.builders.MeetingBuilder in project head by mifos.
the class FeeDaoHibernateIntegrationTest method cleanDatabaseTables.
@Before
public void cleanDatabaseTables() {
databaseCleaner.clean();
MeetingBO weeklyMeeting = new MeetingBuilder().customerMeeting().weekly().every(1).startingToday().build();
IntegrationTestObjectMother.saveMeeting(weeklyMeeting);
weeklyPeriodicFeeForCenterOnly = new FeeBuilder().appliesToCenterOnly().withFeeAmount("100.0").withName("Center Weekly Periodic Fee").withSameRecurrenceAs(weeklyMeeting).with(sampleBranchOffice()).build();
IntegrationTestObjectMother.saveFee(weeklyPeriodicFeeForCenterOnly);
weeklyOneTimeForLoans = new FeeBuilder().appliesToLoans().oneTime().withFeeAmount("100.0").withName("Center Weekly Periodic Fee").withSameRecurrenceAs(weeklyMeeting).with(sampleBranchOffice()).build();
IntegrationTestObjectMother.saveFee(weeklyOneTimeForLoans);
StaticHibernateUtil.flushAndClearSession();
}
use of org.mifos.domain.builders.MeetingBuilder in project head by mifos.
the class SavingsBOTest method setupForEachTest.
@Before
public void setupForEachTest() {
savingsAccountBuilder = new SavingsAccountBuilder().withCustomer(savingsAccountCustomer).withPaymentStrategy(paymentStrategy).withTransactionHelper(savingsTransactionActivityHelper).withCustomerDao(customerDao).withSavingsOfficer(savingsOfficer);
allWorkingDays = Arrays.asList(DayOfWeek.mondayAsDay(), DayOfWeek.tuesdayAsDay(), DayOfWeek.wednesdayAsDay(), DayOfWeek.thursdayAsDay(), DayOfWeek.fridayAsDay(), DayOfWeek.saturdayAsDay(), DayOfWeek.sundayAsDay());
emptyListOfHolidays = new ArrayList<Holiday>();
defaultWeeklyCustomerMeeting = new MeetingBuilder().every(1).weekly().startingFrom(new DateMidnight().toDate()).build();
}
Aggregations