use of org.mifos.domain.builders.MeetingBuilder in project head by mifos.
the class AccountIntegrationTestCase method createInitialCustomerAccounts.
private void createInitialCustomerAccounts() {
meeting = new MeetingBuilder().customerMeeting().weekly().every(1).startingToday().build();
IntegrationTestObjectMother.saveMeeting(meeting);
center = TestObjectFactory.createWeeklyFeeCenter("Center", meeting);
group = TestObjectFactory.createWeeklyFeeGroupUnderCenter("Group", CustomerStatus.GROUP_ACTIVE, center);
List<FeeDto> fees = new ArrayList<FeeDto>();
client = TestObjectFactory.createClient("Client", CustomerStatus.CLIENT_ACTIVE, group, fees, "1034556", new DateTime(1986, 04, 02, 0, 0, 0, 0).toDate());
}
use of org.mifos.domain.builders.MeetingBuilder in project head by mifos.
the class AccountRegenerateScheduleIntegrationTestCase method testChangeThirdThursdayMonthlyMeetingScheduleOnADateInFirstMonthAfterMeetingDate.
@Test
public // original schedule 11/20/08, 12/18/08, 1/15/09, 2/19/09, 3/19/09, 4/16/09
void testChangeThirdThursdayMonthlyMeetingScheduleOnADateInFirstMonthAfterMeetingDate() throws Exception {
List<LocalDate> expectedMeetingDates = new ArrayList<LocalDate>();
expectedMeetingDates.add(new LocalDate(2008, NOVEMBER, 20));
expectedMeetingDates.add(new LocalDate(2008, DECEMBER, 2));
expectedMeetingDates.add(new LocalDate(2009, JANUARY, 6));
expectedMeetingDates.add(new LocalDate(2009, FEBRUARY, 3));
expectedMeetingDates.add(new LocalDate(2009, MARCH, 3));
expectedMeetingDates.add(new LocalDate(2009, APRIL, 7));
LocalDate startDate = new LocalDate(2008, NOVEMBER, 20);
LocalDate dateWhenMeetingWillBeChanged = new LocalDate(2008, NOVEMBER, 30);
MeetingBO meeting = setupMonthlyMeeting(startDate, 1, RankOfDay.THIRD, WeekDay.THURSDAY);
MeetingBO newMeeting = TestObjectFactory.createMeeting(new MeetingBuilder().monthly().every(1).buildMonthlyFor(RankOfDay.FIRST, WeekDay.TUESDAY));
testChangeInMeetingScheduleForDates(meeting, newMeeting, startDate, dateWhenMeetingWillBeChanged);
validateSchedules(expectedMeetingDates);
}
use of org.mifos.domain.builders.MeetingBuilder in project head by mifos.
the class AccountRegenerateScheduleIntegrationTestCase method testChangeMonthlyMeetingScheduleOnADateInFirstMonthBeforeMeetingDate.
@Test
public void testChangeMonthlyMeetingScheduleOnADateInFirstMonthBeforeMeetingDate() throws Exception {
List<LocalDate> expectedMeetingDates = new ArrayList<LocalDate>();
expectedMeetingDates.add(new LocalDate(2008, APRIL, 9));
expectedMeetingDates.add(new LocalDate(2008, MAY, 9));
expectedMeetingDates.add(new LocalDate(2008, JUNE, 20));
expectedMeetingDates.add(new LocalDate(2008, JULY, 20));
expectedMeetingDates.add(new LocalDate(2008, AUGUST, 20));
LocalDate startDate = new LocalDate(2008, APRIL, 9);
LocalDate dateWhenMeetingWillBeChanged = new LocalDate(2008, MAY, 3);
MeetingBO meeting = setupMonthlyMeeting(startDate, 1, 9);
MeetingBO newMeeting = TestObjectFactory.createMeeting(new MeetingBuilder().monthly().every(1).buildMonthlyForDayNumber(20));
testChangeInMeetingScheduleForDates(meeting, newMeeting, startDate, dateWhenMeetingWillBeChanged);
validateSchedules(expectedMeetingDates);
}
use of org.mifos.domain.builders.MeetingBuilder in project head by mifos.
the class AccountRegenerateScheduleIntegrationTestCase method testChangeMonthlyMeetingScheduleOnADateInSecondMonth.
@Test
public void testChangeMonthlyMeetingScheduleOnADateInSecondMonth() throws Exception {
List<LocalDate> expectedMeetingDates = new ArrayList<LocalDate>();
expectedMeetingDates.add(new LocalDate(2008, APRIL, 9));
expectedMeetingDates.add(new LocalDate(2008, MAY, 9));
expectedMeetingDates.add(new LocalDate(2008, JUNE, 9));
expectedMeetingDates.add(new LocalDate(2008, JULY, 20));
expectedMeetingDates.add(new LocalDate(2008, AUGUST, 20));
LocalDate startDate = new LocalDate(2008, APRIL, 9);
LocalDate dateWhenMeetingWillBeChanged = new LocalDate(2008, JUNE, 1);
MeetingBO meeting = setupMonthlyMeeting(startDate, 1, 9);
MeetingBO newMeeting = TestObjectFactory.createMeeting(new MeetingBuilder().monthly().every(1).buildMonthlyForDayNumber(20));
testChangeInMeetingScheduleForDates(meeting, newMeeting, startDate, dateWhenMeetingWillBeChanged);
validateSchedules(expectedMeetingDates);
}
use of org.mifos.domain.builders.MeetingBuilder in project head by mifos.
the class EditStatusActionStrutsTest method createCenterGroupClientHierarchy.
private void createCenterGroupClientHierarchy() throws CustomerException {
meeting = new MeetingBuilder().customerMeeting().weekly().every(1).startingToday().build();
IntegrationTestObjectMother.saveMeeting(meeting);
center = new CenterBuilder().withName("Savings Center").with(meeting).with(sampleBranchOffice()).withLoanOfficer(testUser()).withActivationDate(mondayTwoWeeksAgo()).build();
IntegrationTestObjectMother.createCenter(center, meeting);
group = new GroupBuilder().withName("Group").withMeeting(meeting).withOffice(sampleBranchOffice()).withLoanOfficer(testUser()).withParentCustomer(center).build();
IntegrationTestObjectMother.createGroup(group, meeting);
client = new ClientBuilder().withName("Client 1").active().withMeeting(meeting).withOffice(sampleBranchOffice()).withLoanOfficer(testUser()).withParentCustomer(group).buildForIntegrationTests();
IntegrationTestObjectMother.createClient(client, meeting);
}
Aggregations