use of org.mifos.application.meeting.business.MeetingBO in project head by mifos.
the class MeetingHelperIntegrationTest method testGetMonthMessage.
@Test
public void testGetMonthMessage() throws Exception {
String expected = "Recur on First Monday of every 5 month(s)";
MeetingBO meeting = new MeetingBO(WeekDay.MONDAY, RankOfDay.FIRST, (short) 5, new Date(), MeetingType.CUSTOMER_MEETING, "Delhi");
IntegrationTestObjectMother.saveMeeting(meeting);
meeting = IntegrationTestObjectMother.getMeeting(meeting.getMeetingId());
Assert.assertEquals(expected, helper.getMessage(meeting, TestUtils.makeUser()));
}
use of org.mifos.application.meeting.business.MeetingBO in project head by mifos.
the class MeetingHelperIntegrationTest method testGetDetailMonthFrequecny.
@Test
public void testGetDetailMonthFrequecny() throws Exception {
String expected = "Recur every 5 month(s)";
MeetingBO meeting = new MeetingBO((short) 7, (short) 5, new Date(), MeetingType.CUSTOMER_MEETING, "Delhi");
IntegrationTestObjectMother.saveMeeting(meeting);
meeting = IntegrationTestObjectMother.getMeeting(meeting.getMeetingId());
Assert.assertEquals(expected, helper.getDetailMessageWithFrequency(meeting, TestUtils.makeUser()));
}
use of org.mifos.application.meeting.business.MeetingBO in project head by mifos.
the class MeetingHelperIntegrationTest method testGetMonthFrequecny.
@Test
public void testGetMonthFrequecny() throws Exception {
String expected = "5 month(s)";
MeetingBO meeting = new MeetingBO((short) 7, (short) 5, new Date(), MeetingType.CUSTOMER_MEETING, "Delhi");
IntegrationTestObjectMother.saveMeeting(meeting);
meeting = IntegrationTestObjectMother.getMeeting(meeting.getMeetingId());
Assert.assertEquals(expected, helper.getMessageWithFrequency(meeting, TestUtils.makeUser()));
}
use of org.mifos.application.meeting.business.MeetingBO in project head by mifos.
the class MeetingHelperIntegrationTest method testGetMonthlyOnDayMessage.
@Test
public void testGetMonthlyOnDayMessage() throws Exception {
String expected = "Recur on day 7 of every 2 month(s)";
MeetingBO meeting = new MeetingBO((short) 7, (short) 2, new Date(), MeetingType.CUSTOMER_MEETING, "Delhi");
IntegrationTestObjectMother.saveMeeting(meeting);
meeting = IntegrationTestObjectMother.getMeeting(meeting.getMeetingId());
Assert.assertEquals(expected, helper.getMessage(meeting, TestUtils.makeUser()));
}
use of org.mifos.application.meeting.business.MeetingBO in project head by mifos.
the class CenterServiceFacadeWebTierIntegrationTest method shouldCreateCenterWithExpectedSearchId.
@Test
public void shouldCreateCenterWithExpectedSearchId() {
MeetingBO meeting = new MeetingBuilder().withStartDate(new DateTime().minusWeeks(2)).build();
MeetingDto meetingDto = meeting.toDto();
String displayName = "testCenter";
String externalId = null;
AddressDto addressDto = new AddressDto("here", "", "", "", "", "", "", "");
PersonnelBO user = IntegrationTestObjectMother.findPersonnelById(Short.valueOf("1"));
Short loanOfficerId = user.getPersonnelId();
List<CreateAccountFeeDto> feesToApply = new ArrayList<CreateAccountFeeDto>();
CustomerStatus.GROUP_ACTIVE.getValue();
OfficeBO headOffice = IntegrationTestObjectMother.findOfficeById(Short.valueOf("1"));
// setup
createOfficeHierarchyUnderHeadOffice(headOffice);
Short officeId = branch1.getOfficeId();
DateTime mfiJoiningDate = new DateTime().minusWeeks(2);
new DateTime().minusWeeks(1);
CenterCreationDetail centerCreationDetail = new CenterCreationDetail(mfiJoiningDate.toLocalDate(), displayName, externalId, addressDto, loanOfficerId, officeId, feesToApply);
// exercise test
CustomerDetailsDto newlyCreatedCenterDetails = centerServiceFacade.createNewCenter(centerCreationDetail, meetingDto);
// verification
CenterBO center = customerDao.findCenterBySystemId(newlyCreatedCenterDetails.getGlobalCustNum());
Assert.assertThat(center.getSearchId(), is("1." + center.getCustomerId()));
}
Aggregations