Examples of addExceptionDay()


Examples of org.libreplan.business.calendars.entities.BaseCalendar.addExceptionDay()

    public void testCapacityOnNewVersionFromChristmasCalendar() {
        BaseCalendar calendar = createChristmasCalendar();
        CalendarException day = CalendarException.create(
                CHRISTMAS_DAY_LOCAL_DATE.plusYears(1), EffortDuration.zero(),
                createCalendarExceptionType());
        calendar.addExceptionDay(day);

        calendar.newVersion(CHRISTMAS_DAY_LOCAL_DATE.plusDays(1));

        CalendarExceptionType type = createCalendarExceptionType();
        calendar.updateExceptionDay(CHRISTMAS_DAY_LOCAL_DATE.plusYears(1),
View Full Code Here

Examples of org.libreplan.business.calendars.entities.BaseCalendar.addExceptionDay()

                .plusDays(1));

        CalendarException day = CalendarException.create(
                CHRISTMAS_DAY_LOCAL_DATE, EffortDuration.zero(),
                createCalendarExceptionType());
        calendar.addExceptionDay(day);

        assertThat(calendar.getExceptions().size(), equalTo(1));
        assertThat(calendar.getExceptions().iterator().next().getDate(),
                equalTo(CHRISTMAS_DAY_LOCAL_DATE));
    }
View Full Code Here

Examples of org.libreplan.business.calendars.entities.BaseCalendar.addExceptionDay()

    @Test
    public void testExceptionsInDifferentVersions() {
        BaseCalendar calendar = createBasicCalendar();
        calendar.newVersion(WEDNESDAY_LOCAL_DATE);

        calendar.addExceptionDay(CalendarException.create(MONDAY_LOCAL_DATE,
                zero(), createCalendarExceptionType()));
        calendar.addExceptionDay(CalendarException.create(FRIDAY_LOCAL_DATE,
                zero(), createCalendarExceptionType()));

        assertThat(calendar.getCapacityOn(wholeDay(MONDAY_LOCAL_DATE)),
View Full Code Here

Examples of org.libreplan.business.calendars.entities.BaseCalendar.addExceptionDay()

        BaseCalendar calendar = createBasicCalendar();
        calendar.newVersion(WEDNESDAY_LOCAL_DATE);

        calendar.addExceptionDay(CalendarException.create(MONDAY_LOCAL_DATE,
                zero(), createCalendarExceptionType()));
        calendar.addExceptionDay(CalendarException.create(FRIDAY_LOCAL_DATE,
                zero(), createCalendarExceptionType()));

        assertThat(calendar.getCapacityOn(wholeDay(MONDAY_LOCAL_DATE)),
                equalTo(zero()));
View Full Code Here

Examples of org.libreplan.business.calendars.entities.BaseCalendar.addExceptionDay()

        LocalDate pastMonth = (new LocalDate()).minusMonths(1);
        CalendarException exceptionDay = CalendarException.create(pastMonth,
                zero(),
                createCalendarExceptionType());

        calendar.addExceptionDay(exceptionDay);
    }

    @Test
    public void testAllowRemoveExceptionsInThePast() {
        BaseCalendar calendar = createBasicCalendar();
View Full Code Here

Examples of org.libreplan.business.calendars.entities.BaseCalendar.addExceptionDay()

        LocalDate pastMonth = (new LocalDate()).minusMonths(1);
        CalendarException exceptionDay = CalendarException.create(pastMonth,
                zero(), createCalendarExceptionType());

        calendar.addExceptionDay(exceptionDay);
        calendar.removeExceptionDay(pastMonth);
    }

    @Test
    public void testAllowSetExpiringDateInThePast() {
View Full Code Here

Examples of org.libreplan.business.calendars.entities.BaseCalendar.addExceptionDay()

    public void testCapacityOnDerivedBasicCalendarWithException() {
        BaseCalendar calendar = createBasicCalendar().newDerivedCalendar();

        CalendarException day = CalendarException.create(WEDNESDAY_LOCAL_DATE,
                hours(4), createCalendarExceptionType());
        calendar.addExceptionDay(day);

        EffortDuration mondayHours = calendar
                .getCapacityOn(wholeDay(MONDAY_LOCAL_DATE));
        assertThat(mondayHours, equalTo(hours(8)));
View Full Code Here

Examples of org.libreplan.business.calendars.entities.BaseCalendar.addExceptionDay()

        BaseCalendar calendar = createChristmasCalendar().newDerivedCalendar();

        CalendarException day = CalendarException.create(
                CHRISTMAS_DAY_LOCAL_DATE, hours(4),
                createCalendarExceptionType());
        calendar.addExceptionDay(day);

        EffortDuration hours = calendar
                .getCapacityOn(wholeDay(CHRISTMAS_DAY_LOCAL_DATE));
        assertThat(hours, equalTo(hours(4)));
    }
View Full Code Here

Examples of org.libreplan.business.calendars.entities.BaseCalendar.addExceptionDay()

    public void testAddTwoExceptionDaysInTheSameDate() {
        BaseCalendar calendar = createBasicCalendar();

        CalendarException day = CalendarException.create(MONDAY_LOCAL_DATE,
                hours(8), createCalendarExceptionType());
        calendar.addExceptionDay(day);

        CalendarException day2 = CalendarException.create(MONDAY_LOCAL_DATE,
                hours(4), createCalendarExceptionType());
        calendar.addExceptionDay(day2);
    }
View Full Code Here

Examples of org.libreplan.business.calendars.entities.BaseCalendar.addExceptionDay()

                hours(8), createCalendarExceptionType());
        calendar.addExceptionDay(day);

        CalendarException day2 = CalendarException.create(MONDAY_LOCAL_DATE,
                hours(4), createCalendarExceptionType());
        calendar.addExceptionDay(day2);
    }

    @Test
    public void testCreateNewVersion() {
        BaseCalendar calendar = createBasicCalendar();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.