use of org.mifos.application.meeting.util.helpers.WeekDay in project head by mifos.
the class FiscalCalendarRules method getWeekDaysList.
public List<WeekDay> getWeekDaysList() {
WeekDay[] weekDays = WeekDay.values();
List<WeekDay> list = new ArrayList<WeekDay>();
for (WeekDay weekDay : weekDays) {
list.add(weekDay);
}
return list;
}
use of org.mifos.application.meeting.util.helpers.WeekDay in project head by mifos.
the class MeetingRecurrenceTypeEntityTest method shouldCreateDtoWithCorrectRecurrenceDetailsForWeekDayAndWeekOfMonth.
@Test
public void shouldCreateDtoWithCorrectRecurrenceDetailsForWeekDayAndWeekOfMonth() throws Exception {
// setup
MeetingDetailsEntity meetingDetails = null;
RankOfDay rank = RankOfDay.FIRST;
WeekDay weekDay = WeekDay.MONDAY;
Short dayNumber = null;
meetingRecurrenceEntity = new MeetingRecurrenceEntity(dayNumber, weekDay, rank, meetingDetails);
// exercise test
MeetingRecurrenceDto meetingRecurrenceDto = meetingRecurrenceEntity.toDto();
// verification
assertThat(meetingRecurrenceDto.getDayNumber(), is(1));
assertThat(meetingRecurrenceDto.getDayOfWeek(), is(WeekDay.MONDAY.getValue().intValue()));
assertThat(meetingRecurrenceDto.getWeekOfMonth(), is(RankOfDay.FIRST.getValue().intValue()));
}
Aggregations