Examples of invalidAt()


Examples of org.libreplan.business.calendars.entities.AvailabilityTimeLine.invalidAt()

    }

    @Test
    public void anInvalidityPeriodGeneratesTwoValidIntervals() {
        AvailabilityTimeLine timeLine = AvailabilityTimeLine.allValid();
        timeLine.invalidAt(contemporaryExample, lateExample);
        List<Interval> validPeriods = timeLine.getValidPeriods();

        assertThat(validPeriods, definedBy(StartOfTime.create(),
                point(contemporaryExample), point(lateExample), EndOfTime
                        .create()));
View Full Code Here

Examples of org.libreplan.business.calendars.entities.AvailabilityTimeLine.invalidAt()

    }

    @Test
    public void anInvalidPointGeneratesTwoValidPeriods() {
        AvailabilityTimeLine timeLine = AvailabilityTimeLine.allValid();
        timeLine.invalidAt(contemporaryExample);
        assertThat(timeLine.getValidPeriods(), definedBy(StartOfTime.create(),
                point(contemporaryExample), point(contemporaryExample
                        .plusDays(1)), EndOfTime.create()));
    }
View Full Code Here

Examples of org.libreplan.business.calendars.entities.AvailabilityTimeLine.invalidAt()

    @Test
    public void aCombinationOfSeveralInvalidPeriods() {
        AvailabilityTimeLine timeLine = AvailabilityTimeLine.allValid();
        timeLine.invalidUntil(earlyExample);
        timeLine.invalidAt(contemporaryExample, lateExample);
        timeLine.invalidFrom(lateExample.plusDays(10));
        assertThat(timeLine.getValidPeriods(), definedBy(point(earlyExample),
                point(contemporaryExample), point(lateExample),
                point(lateExample.plusDays(10))));
    }
View Full Code Here

Examples of org.libreplan.business.calendars.entities.AvailabilityTimeLine.invalidAt()

            LocalDate startDate = each.getStartDate();
            assert startDate != null : "satisfactions start date is not null";
            if (previousEnd == null) {
                result.invalidUntil(startDate);
            } else {
                result.invalidAt(previousEnd, startDate);
            }
            previousEnd = each.getEndDate();
            if (previousEnd == null) {
                break;
            }
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.