Search in sources :

Example 16 with WeekDay

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;
}
Also used : WeekDay(org.mifos.application.meeting.util.helpers.WeekDay) ArrayList(java.util.ArrayList)

Example 17 with WeekDay

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()));
}
Also used : WeekDay(org.mifos.application.meeting.util.helpers.WeekDay) RankOfDay(org.mifos.application.meeting.util.helpers.RankOfDay) MeetingRecurrenceDto(org.mifos.dto.domain.MeetingRecurrenceDto) Test(org.junit.Test)

Aggregations

WeekDay (org.mifos.application.meeting.util.helpers.WeekDay)17 ArrayList (java.util.ArrayList)6 MeetingBO (org.mifos.application.meeting.business.MeetingBO)6 MessageLookup (org.mifos.application.master.MessageLookup)5 MeetingException (org.mifos.application.meeting.exceptions.MeetingException)5 RankOfDay (org.mifos.application.meeting.util.helpers.RankOfDay)5 FiscalCalendarRules (org.mifos.config.FiscalCalendarRules)5 LocalDate (org.joda.time.LocalDate)4 BusinessRuleException (org.mifos.service.BusinessRuleException)4 CustomerBO (org.mifos.customers.business.CustomerBO)3 BigDecimal (java.math.BigDecimal)2 Date (java.util.Date)2 AmountFeeBO (org.mifos.accounts.fees.business.AmountFeeBO)2 FeeBO (org.mifos.accounts.fees.business.FeeBO)2 LoanOfferingBO (org.mifos.accounts.productdefinition.business.LoanOfferingBO)2 ConfigurationBusinessService (org.mifos.config.business.service.ConfigurationBusinessService)2 MifosRuntimeException (org.mifos.core.MifosRuntimeException)2 CreateAccountFeeDto (org.mifos.dto.domain.CreateAccountFeeDto)2 CreateAccountPenaltyDto (org.mifos.dto.domain.CreateAccountPenaltyDto)2 FeeDto (org.mifos.dto.domain.FeeDto)2